From: Stefan Fritsch Date: Wed, 18 Aug 2010 20:10:12 +0000 (+0000) Subject: Perform NULL check before dereferencing arg, not after. X-Git-Tag: 2.3.7~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=944257a98d4d5d51457f2bccff19eae022610c33;p=thirdparty%2Fapache%2Fhttpd.git Perform NULL check before dereferencing arg, not after. PR: 49634 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@986901 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index 5bd4ac3376b..cfff20541ce 100644 --- a/server/core.c +++ b/server/core.c @@ -1735,11 +1735,7 @@ static const char *dirsection(cmd_parms *cmd, void *mconfig, const char *arg) arg = apr_pstrndup(cmd->pool, arg, endp - arg); - if (!arg[0]) { - return missing_container_arg(cmd); - } - - if (!arg) { + if (!arg || !arg[0]) { if (thiscmd->cmd_data) return " block must specify a path"; else