wininet: HTTP_QUERY_RAW_HEADERS_CRLF length shouldn't include nul (take 2)

Dan Kegel dank at kegel.com
Wed Jul 30 08:49:04 CDT 2008


Add test to check whether HTTP_QUERY_RAW_HEADERS_CRLF
should include the terminating NUL in the reported length,
fix problem it exposed.  Tested on XP.
Reviewed by dsh and hans.

Change since first post:
- fix bug pointed out by Hans
- make tests slightly stricter
- also test HttpQueryInfoW's behavior

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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wininet-http-query-crlf-3.patch
Type: text/x-diff
Size: 4011 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080730/f35d7dc8/attachment.patch 


More information about the wine-patches mailing list