Commit 45fccb8c authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed off-by-one error in string allocation.

parent 5e9dab58
......@@ -156,7 +156,7 @@ static void remove_options( char *argv[], int pos, int count, int inherit )
for (i = 0; i < count; i++) len += strlen(argv[pos+i]) + 1;
if (inherit_str)
{
if (!(inherit_str = realloc( inherit_str, strlen(inherit_str) + len )))
if (!(inherit_str = realloc( inherit_str, strlen(inherit_str) + 1 + len )))
out_of_memory();
strcat( inherit_str, " " );
}
......
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