From: William A. Rowe Jr Date: Mon, 23 Jul 2001 19:52:41 +0000 (+0000) Subject: The original answer was evil, return NULL if the file name has no path! X-Git-Tag: 2.0.22~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea2a3f582edbdcce6951bc98784b245339cbb40f;p=thirdparty%2Fapache%2Fhttpd.git The original answer was evil, return NULL if the file name has no path! git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89666 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util.c b/server/util.c index 7ff05caa6e6..8d529b054bb 100644 --- a/server/util.c +++ b/server/util.c @@ -599,8 +599,7 @@ AP_DECLARE(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s) int l; if (last_slash == NULL) { - /* XXX: well this is really broken if this happens */ - return (apr_pstrdup(p, "/")); + return NULL; } l = (last_slash - s) + 1; d = apr_palloc(p, l + 1);