kernel32: Fix uninitialised memory read in GetPrivateProfileStringA if GetPrivateProfileStringW returns 0.

Rob Shearman robertshearman at gmail.com
Sun Nov 29 04:34:19 CST 2009


The that was passed into the function will remain uninitialised. Fix
reading from this by only reading retW characters from bufferW and
manually nul-terminating the string.
---
 dlls/kernel32/profile.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

Fixes the uninitialised memory reads reported here:
http://kegel.com/wine/valgrind/logs/2009-11-27-12.53/vg-kernel32_profile.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-kernel32-Fix-uninitialised-memory-read-in-GetPrivate.patch
Type: text/x-patch
Size: 837 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20091129/7056c821/attachment-0001.bin>


More information about the wine-patches mailing list