James Hawkins : kernel32: Don' t get the profile string if the buffer length is zero.
Module: wine Branch: master Commit: 978a9317812d8e25d125427ee0cd6e531621fe29 URL: http://source.winehq.org/git/wine.git/?a=commit;h=978a9317812d8e25d125427ee0... Author: James Hawkins <jhawkins(a)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)
participants (1)
-
Alexandre Julliard