From: rousskov <> Date: Wed, 14 Nov 2007 04:25:35 +0000 (+0000) Subject: Bug 2123 partial fix: Allocate space for a NULL terminator of the helper X-Git-Tag: SQUID_3_0_STABLE1~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1b8af627099f52c795d0deff50168ac78cd9e241;p=thirdparty%2Fsquid.git Bug 2123 partial fix: Allocate space for a NULL terminator of the helper argument array. --- diff --git a/src/helper.cc b/src/helper.cc index 43d49225c9..b95c28a61d 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -1,6 +1,6 @@ /* - * $Id: helper.cc,v 1.89 2007/10/04 16:43:54 wessels Exp $ + * $Id: helper.cc,v 1.90 2007/11/13 21:25:35 rousskov Exp $ * * DEBUG: section 84 Helper process maintenance * AUTHOR: Harvest Derived? @@ -77,7 +77,7 @@ helperOpenServers(helper * hlp) char *progname; char *shortname; char *procname; - const char *args[HELPER_MAX_ARGS]; + const char *args[HELPER_MAX_ARGS+1]; // save space for a NULL terminator char fd_note_buf[FD_DESC_SZ]; helper_server *srv; int nargs = 0; @@ -180,7 +180,7 @@ void helperStatefulOpenServers(statefulhelper * hlp) { char *shortname; - const char *args[HELPER_MAX_ARGS]; + const char *args[HELPER_MAX_ARGS+1]; // save space for a NULL terminator char fd_note_buf[FD_DESC_SZ]; int nargs = 0;