]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Check to make sure that there is a file name before sending it to strncmp(). This
authorBradley Nicholes <bnicholes@apache.org>
Wed, 1 Oct 2003 17:10:48 +0000 (17:10 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Wed, 1 Oct 2003 17:10:48 +0000 (17:10 +0000)
fixes a page fault on NetWare when using mod_proxy with mod_cache.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@101365 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy.c

index b903578fadf7b6b7e2b6e085a189f23c68313cf6..41e53fd0d4f2e1dbae6e8c96e7fa7b6fbdfcabd4 100644 (file)
@@ -275,7 +275,7 @@ static int proxy_fixup(request_rec *r)
     char *url, *p;
     int access_status;
 
-    if (!r->proxyreq || strncmp(r->filename, "proxy:", 6) != 0)
+    if (!r->proxyreq || !r->filename || strncmp(r->filename, "proxy:", 6) != 0)
         return DECLINED;
 
     /* XXX: Shouldn't we try this before we run the proxy_walk? */
@@ -351,7 +351,7 @@ static int proxy_handler(request_rec *r)
     long maxfwd;
 
     /* is this for us? */
-    if (!r->proxyreq || strncmp(r->filename, "proxy:", 6) != 0)
+    if (!r->proxyreq || !r->filename || strncmp(r->filename, "proxy:", 6) != 0)
         return DECLINED;
 
     /* handle max-forwards / OPTIONS / TRACE */