Fixed off by 1 error in section code (did not return len-2 on buffer
overflow in some cases, but len-1).
This commit is contained in:
parent
4a3b0e3080
commit
acfae0c117
|
@ -579,7 +579,7 @@ static INT PROFILE_GetSection( PROFILESECTION *section, LPCSTR section_name,
|
|||
}
|
||||
}
|
||||
*buffer = '\0';
|
||||
if (len < 1)
|
||||
if (len <= 1)
|
||||
/*If either lpszSection or lpszKey is NULL and the supplied
|
||||
destination buffer is too small to hold all the strings,
|
||||
the last string is truncated and followed by two null characters.
|
||||
|
|
Loading…
Reference in New Issue