wininet: HTTP_QUERY_RAW_HEADERS_CRLF length shouldn't include nul
Dan Kegel
dank at kegel.com
Wed Jul 23 18:26:32 CDT 2008
QueryHttpInfoW's reported length was off by one for
HTTP_QUERY_RAW_HEADERS_CRLF.
Add test to check whether HTTP_QUERY_RAW_HEADERS_CRLF
should include the terminating NUL in the reported length,
fix problem it exposed. The code now looks more like neighboring cases.
Tested on XP.
I started looking at this because it popped up in valgrind runs
of Picasa. It also shows up in my daily scans of the conformance test suite.
Fixes Valgrind warnings like:
Use of uninitialised value of size 4
at wcstombs_sbcs (wctomb.c:187)
by wine_cp_wcstombs (wctomb.c:457)
by WideCharToMultiByte (locale.c:1936)
by HttpQueryInfoA (http.c:2560)
by HttpHeaders_test (http.c:1158)
Uninitialised value was created by a client request
at mark_block_uninitialized (heap.c:164)
by RtlAllocateHeap (heap.c:1239)
by HttpQueryInfoA (http.c:2546)
by HttpHeaders_test (http.c:1158)
More information about the wine-patches
mailing list