Commit 4e700d36 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Make sure not to strcpy from a NULL default value pointer.

parent 8c523fe3
......@@ -1112,10 +1112,12 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
else
/* PROFILE_GetString can handle the 'entry == NULL' case */
ret = PROFILE_GetString( section, entry, pDefVal, buffer, len, win32 );
} else {
} else if (buffer && pDefVal) {
lstrcpynW( buffer, pDefVal, len );
ret = strlenW( buffer );
}
else
ret = 0;
RtlLeaveCriticalSection( &PROFILE_CritSect );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment