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

Rob Shearman robertshearman at
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:
-------------- 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: <>

More information about the wine-patches mailing list