From 45fccb8c0c04c7d3b0746d816e7ee5e20f56fd65 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 7 Jun 2000 02:03:54 +0000 Subject: [PATCH] Fixed off-by-one error in string allocation. --- misc/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/options.c b/misc/options.c index aac9e21564d..ea5729a3326 100644 --- a/misc/options.c +++ b/misc/options.c @@ -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, " " ); }