Fulfills Brian Pane's suggestion that we always overallocate by one
to make /foo/bar quickly convertable to /foo/bar/
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93047
13f79535-47bb-0310-9956-
ffa450edef68
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);