shlwapi/tests: initialize size parameter in test_SHGetShellKey

Dan Kegel dank at kegel.com
Fri Oct 14 10:23:08 CDT 2011


The caller to SKGetValueW forgot to pass in a valid buffer size,
so valgrind complained:

Conditional jump or move depends on uninitialised value(s)
   at NtQueryValueKey (reg.c:524)
   by RegQueryValueExW (registry.c:1341)
   by SHQueryValueExW (reg.c:1415)
   by SKGetValueW (ordinal.c:4707)
   by test_SHGetShellKey (ordinal.c:2876)
   by func_ordinal (ordinal.c:2989)
   by run_test (test.h:556)
   by main (test.h:624)
 Uninitialised value was created by a stack allocation
   at test_SHGetShellKey (ordinal.c:2804)

Setting the size makes valgrind happy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shlwapi-tests-ordinal-init.patch
Type: text/x-patch
Size: 445 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20111014/3f70852c/attachment.bin>


More information about the wine-patches mailing list