Received: (from majordom@localhost) by hyperreal.com (8.8.5/8.8.5) id VAA01349; Mon, 28 Apr 1997 21:45:58 -0700 (PDT) Received: (from dgaudet@localhost) by hyperreal.com (8.8.5/8.8.5) id VAA01338 for apache-cvs; Mon, 28 Apr 1997 21:45:54 -0700 (PDT) Date: Mon, 28 Apr 1997 21:45:54 -0700 (PDT) From: Dean Gaudet Message-Id: <199704290445.VAA01338@hyperreal.com> To: apache-cvs@hyperreal.com Subject: cvs commit: apache/src util_script.c Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org dgaudet 97/04/28 21:45:53 Modified: src util_script.c Log: Fix an off-by-1 error. Revision Changes Path 1.56 +3 -3 apache/src/util_script.c Index: util_script.c =================================================================== RCS file: /export/home/cvs/apache/src/util_script.c,v retrieving revision 1.55 retrieving revision 1.56 diff -C3 -r1.55 -r1.56 *** util_script.c 1997/04/29 03:41:13 1.55 --- util_script.c 1997/04/29 04:45:52 1.56 *************** *** 93,102 **** for (x = 0, numwords = 1; args[x]; x++) if (args[x] == '+') ++numwords; ! if (numwords > APACHE_ARG_MAX - 4) { ! numwords = APACHE_ARG_MAX - 4; /* Truncate args to prevent overrun */ } ! av = (char **)palloc(p, (numwords + 4) * sizeof(char *)); if (path) av[idx++] = path; --- 93,102 ---- for (x = 0, numwords = 1; args[x]; x++) if (args[x] == '+') ++numwords; ! if (numwords > APACHE_ARG_MAX - 5) { ! numwords = APACHE_ARG_MAX - 5; /* Truncate args to prevent overrun */ } ! av = (char **)palloc(p, (numwords + 5) * sizeof(char *)); if (path) av[idx++] = path;