Check for enough buffer space in PROFILE_GetSection().

This commit is contained in:
Marcus Meissner 2001-06-06 21:03:40 +00:00 committed by Alexandre Julliard
parent decd475621
commit ee6ea51c02
1 changed files with 2 additions and 0 deletions

View File

@ -722,6 +722,8 @@ static INT PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name,
PROFILE_CopyEntry( buffer, key->name, len - 1, handle_env );
len -= strlen(buffer) + 1;
buffer += strlen(buffer) + 1;
if (len < 2)
break;
if (return_values && key->value) {
buffer[-1] = '=';
PROFILE_CopyEntry ( buffer,