Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 35172 invoked by uid 500); 27 Jan 2002 07:49:06 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 35161 invoked by uid 500); 27 Jan 2002 07:49:06 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 27 Jan 2002 07:49:05 -0000 Message-ID: <20020127074905.52806.qmail@icarus.apache.org> From: wrowe@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/server util.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N wrowe 02/01/26 23:49:05 Modified: server util.c Log: Whoops - this patch is required by the last request.c change. Fulfills Brian Pane's suggestion that we always overallocate by one to make /foo/bar quickly convertable to /foo/bar/ Revision Changes Path 1.119 +4 -1 httpd-2.0/server/util.c Index: util.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/util.c,v retrieving revision 1.118 retrieving revision 1.119 diff -u -r1.118 -r1.119 --- util.c 3 Dec 2001 00:49:28 -0000 1.118 +++ util.c 27 Jan 2002 07:49:05 -0000 1.119 @@ -1703,7 +1703,10 @@ len1 = strlen(src1); len2 = strlen(src2); - path = (char *)apr_palloc(a, len1 + len2 + 2); /* +2 for '/' plus null */ + /* allocate +3 for '/' delimiter, trailing NULL and overallocate + * one extra byte to allow the caller to add a trailing '/' + */ + path = (char *)apr_palloc(a, len1 + len2 + 3); if (len1 == 0) { *path = '/'; memcpy(path + 1, src2, len2 + 1);