Alexandre Julliard : kernel32: Null-terminate the buffer also on error in GetPrivateProfileString16.
Alexandre Julliard
julliard at winehq.org
Mon Nov 16 11:43:53 CST 2009
Module: wine
Branch: master
Commit: 935e06c5c37e12405364e2ba65af0eedf44d4f85
URL: http://source.winehq.org/git/wine.git/?a=commit;h=935e06c5c37e12405364e2ba65af0eedf44d4f85
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Nov 16 11:36:08 2009 +0100
kernel32: Null-terminate the buffer also on error in GetPrivateProfileString16.
---
dlls/kernel32/file16.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dlls/kernel32/file16.c b/dlls/kernel32/file16.c
index 30c7bdd..e4f703d 100644
--- a/dlls/kernel32/file16.c
+++ b/dlls/kernel32/file16.c
@@ -555,6 +555,7 @@ INT16 WINAPI GetPrivateProfileString16( LPCSTR section, LPCSTR entry,
ret = GetPrivateProfileSectionA( section, data, size, filename );
if (!ret)
{
+ if (len) *buffer = 0;
HeapFree( GetProcessHeap(), 0, data );
return 0;
}
More information about the wine-cvs
mailing list