Commit ebacf052 authored by Jiaxing Wang's avatar Jiaxing Wang Committed by Alexandre Julliard

regedit: Need 3 bytes of room at end of buffer for \r\n\0 to avoid endless loop.

parent a1790df3
......@@ -641,7 +641,7 @@ static void processRegLinesA(FILE *in, char* first_chars)
/* Do we need to expand the buffer ? */
assert (s >= line && s <= line + lineSize);
size_remaining = lineSize - (s-line);
if (size_remaining < 2) /* room for 1 character and the \0 */
if (size_remaining < 3) /* need at least 3 bytes of room for \r\n\0 */
{
char *new_buffer;
size_t new_size = lineSize + REG_VAL_BUF_SIZE;
......
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