shell32/tests: shlfileop.c: avoid buffer overflow during test (take 2)

Dan Kegel dank at
Tue Jun 10 08:07:20 CDT 2008

Don't intentionally cause a buffer overflow during the test
(all we intended to do was to test with filenames longer
than MAX_PATH)

Changes since first try:
Removed hunk that Alexandre didn't like, now it only affects the tests.

With this change, you might not need part of Alistair's change.

Fixes several valgrind warnings like:

Conditional jump or move depends on uninitialised value(s)
   at strlen (mc_replace_strmem.c:242)
   by lstrlenA (string.c:364)
   by SHNameTranslate (shlfileop.c:828)
   by SHFileOperationA (shlfileop.c:875)
   by test_copy (shlfileop.c:852)
   by func_shlfileop (shlfileop.c:1437)
 Uninitialised value was created by a stack allocation
   at test_copy (shlfileop.c:478)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shell32-shlfileop.patch
Type: text/x-diff
Size: 3885 bytes
Desc: not available
Url : 

More information about the wine-patches mailing list