From 95741bd34a0f349f419dacbb9ccff01809fd7053 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 20 Feb 2007 09:09:47 +0000 Subject: [PATCH] MFB --- sapi/cgi/cgi_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 9862f7895f..4805f2ca48 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1569,7 +1569,8 @@ consult the installation file that came with this distribution, or visit \n\ } } - s = malloc(++len + 1); + len += 2; + s = malloc(len); *s = '\0'; /* we are pretending it came from the environment */ for (i = php_optind; i < argc; i++) { strlcat(s, argv[i], len); -- 2.50.1