summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-02-19 23:52:13 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-02-19 23:52:13 +0000
commit9ae588dfb16eeaf0fe868f5048f669a3a5bc247a (patch)
tree84676d0997d9518c6e0762d1df1214c86085965a /sapi
parentba4cbbaf6990a9f827c5d8cc99bfcedb7731cf13 (diff)
downloadphp-git-9ae588dfb16eeaf0fe868f5048f669a3a5bc247a.tar.gz
Fixed strlcat() usage.
# Thanks Andi
Diffstat (limited to 'sapi')
-rw-r--r--sapi/cgi/cgi_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 830dee4ccf..4b92e55df2 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -1636,7 +1636,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);