Commit acfae0c1 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Fixed off by 1 error in section code (did not return len-2 on buffer

overflow in some cases, but len-1).
parent 4a3b0e30
......@@ -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.
......
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