advpack: fix off-by-one error in AdvInstallFileW that caused buffer overrun

Dan Kegel dank at kegel.com
Thu Nov 26 23:49:50 CST 2009


 Found by valgrind in log
 http://kegel.com/wine/valgrind/logs/2009-11-26-06.08/vg-advpack_files.txt
 Fixes warning:
  Invalid write of size 2
     at  strcpyW (unicode.h:224)
     by  lstrcpyW (string.c:104)
     by  AdvInstallFileW (files.c:283)
     by  AdvInstallFileA (files.c:216)
     by  test_AdvInstallFile (files.c:513)
   Address 0x7f0381a6 is 0 bytes after a block of size 30 alloc'd
     at  notify_alloc (heap.c:247)
     by  RtlAllocateHeap (heap.c:1695)
     by  AdvInstallFileW (files.c:282)
     by  AdvInstallFileA (files.c:216)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-off-by-one-error-in-AdvInstallFileW-that-caused.patch
Type: text/x-patch
Size: 1754 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20091126/20423ce1/attachment.bin>


More information about the wine-patches mailing list