James Hawkins : kernel32: Don' t get the profile string if the buffer length is zero.

Alexandre Julliard julliard at winehq.org
Fri Jul 18 06:46:28 CDT 2008


Module: wine
Branch: master
Commit: 978a9317812d8e25d125427ee0cd6e531621fe29
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=978a9317812d8e25d125427ee0cd6e531621fe29

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Thu Jul 17 12:27:14 2008 -0500

kernel32: Don't get the profile string if the buffer length is zero.

---

 dlls/kernel32/profile.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c
index 8209a2a..74622ad 100644
--- a/dlls/kernel32/profile.c
+++ b/dlls/kernel32/profile.c
@@ -957,7 +957,7 @@ static INT PROFILE_GetString( LPCWSTR section, LPCWSTR key_name,
     PROFILEKEY *key = NULL;
     static const WCHAR empty_strW[] = { 0 };
 
-    if(!buffer) return 0;
+    if(!buffer || !len) return 0;
 
     if (!def_val) def_val = empty_strW;
     if (key_name)




More information about the wine-cvs mailing list