Fixed off-by-one error in string allocation.

This commit is contained in:
Alexandre Julliard 2000-06-07 02:03:54 +00:00
parent 5e9dab58da
commit 45fccb8c0c
1 changed files with 1 additions and 1 deletions

View File

@ -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, " " );
}