httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r986901 - /httpd/httpd/trunk/server/core.c
Date Wed, 18 Aug 2010 20:10:12 GMT
Author: sf
Date: Wed Aug 18 20:10:12 2010
New Revision: 986901

URL: http://svn.apache.org/viewvc?rev=986901&view=rev
Log:
Perform NULL check before dereferencing arg, not after.

PR: 49634

Modified:
    httpd/httpd/trunk/server/core.c

Modified: httpd/httpd/trunk/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=986901&r1=986900&r2=986901&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Wed Aug 18 20:10:12 2010
@@ -1735,11 +1735,7 @@ static const char *dirsection(cmd_parms 
 
     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 "<DirectoryMatch > block must specify a path";
         else



Mime
View raw message