ntdll: avoid buffer overrun in lookup_manifest_file

Dan Kegel dank at kegel.com
Sat Oct 15 11:16:15 CDT 2011


FileName is not nul-terminated.  There are other unsafe-looking
references in there, but Valgrind only complained about the strcmpiW,
so that's the one I fixed.

Gets rid of 26 valgrind warnings in comctl32/tests/imagelist.ok of the form

Use of uninitialised value of size 4
   at tolowerW (unicode.h:123)
   by strcmpiW (string.c:32)
   by lookup_manifest_file (actctx.c:1880)
   by RtlCreateActivationContext (actctx.c:1945)
   by CreateActCtxW (actctx.c:127)
   by CreateActCtxA (actctx.c:105)
   by load_v6_module (v6util.h:126)
   by func_header (header.c:1846)
   by run_test (test.h:556)
   by main (test.h:624)
 Uninitialised value was created by a stack allocation
   at lookup_manifest_file (actctx.c:1822)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ntdll-actctx.patch
Type: text/x-patch
Size: 743 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20111015/74f12e38/attachment.bin>


More information about the wine-patches mailing list