VirtualBox

Changeset 102561 in vbox


Ignore:
Timestamp:
Dec 11, 2023 8:19:20 AM (14 months ago)
Author:
vboxsync
Message:

IPRT/HttpServer: Fixed an ASAN warning. bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/http-server.cpp

    r100670 r102561  
    423423
    424424    RTHttpHeaderListDestroy(pReq->hHdrLst);
     425    pReq->hHdrLst = NIL_RTHTTPHEADERLIST;
    425426
    426427    rtHttpServerBodyDestroy(&pReq->Body);
     
    473474
    474475    RTHttpHeaderListDestroy(pResp->hHdrLst);
     476    pResp->hHdrLst = NIL_RTHTTPHEADERLIST;
    475477
    476478    rtHttpServerBodyDestroy(&pResp->Body);
     
    499501    char **ppapszStrings;
    500502    size_t cStrings;
    501     int rc2 = RTStrSplit(pszData, strlen(pszData), RTHTTPSERVER_HTTP11_EOL_STR, &ppapszStrings, &cStrings);
     503    int rc2 = RTStrSplit(pszData, strlen(pszData) + 1 /* Must include terminator */,
     504                         RTHTTPSERVER_HTTP11_EOL_STR, &ppapszStrings, &cStrings);
    502505    if (RT_SUCCESS(rc2))
    503506    {
     
    789792
    790793        RTHttpHeaderListDestroy(HdrLst);
     794        HdrLst = NIL_RTHTTPHEADERLIST;
    791795
    792796        if (rc == VERR_BROKEN_PIPE) /* Could happen on fast reloads. */
     
    883887
    884888        RTHttpHeaderListDestroy(HdrLst);
     889        HdrLst = NIL_RTHTTPHEADERLIST;
    885890    }
    886891
     
    964969
    965970            RTHttpHeaderListDestroy(HdrLst);
     971            HdrLst = NIL_RTHTTPHEADERLIST;
    966972
    967973            size_t cbToRead  = fsObj.cbObject;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette