Re: kernel32: GetPrivateProfileString should set buffer to "" if default value is not set (resend)
8 Jul
2008
8 Jul
'08
2:45 a.m.
"Dan Kegel" <dank(a)kegel.com> writes:
diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c index 9b6b1a1..e52cd66 100644 --- a/dlls/kernel32/profile.c +++ b/dlls/kernel32/profile.c @@ -1114,9 +1114,10 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry, } else if (buffer && def_val) { lstrcpynW( buffer, def_val, len ); ret = strlenW( buffer ); - } - else + } else { + buffer[0] = 0; /* buffer must be a null terminated empty string */ ret = 0;
What if len is 0? What if buffer is NULL? -- Alexandre Julliard julliard(a)winehq.org
6456
Age (days ago)
6456
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard