]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
merge 1855743,1855744 ^/httpd/httpd/trunk .
authorEric Covener <covener@apache.org>
Mon, 18 Mar 2019 12:10:15 +0000 (12:10 +0000)
committerEric Covener <covener@apache.org>
Mon, 18 Mar 2019 12:10:15 +0000 (12:10 +0000)
r->parsed_uri.path safety in recent backport

*) core: fix SEGFAULT in CONNECT with recent change
   2.4.x: svn merge -c 1855743,1855744 ^/httpd/httpd/trunk .
   +1: rpluem, icing, covener

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

server/request.c
server/util.c

index 1ce8908824b6ba52174666da5d8e9d417cba2775..d5c558afa3005116e2ed5d10fe360909a15fdbf8 100644 (file)
@@ -195,7 +195,9 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
     ap_getparents(r->uri);     /* OK --- shrinking transformations... */
     if (sconf->merge_slashes != AP_CORE_CONFIG_OFF) { 
         ap_no2slash(r->uri);
-        ap_no2slash(r->parsed_uri.path);
+        if (r->parsed_uri.path) {
+            ap_no2slash(r->parsed_uri.path);
+        }
      }
 
     /* All file subrequests are a huge pain... they cannot bubble through the
index 607c4850d86fabebbdc03ab3aad330af85d1e8e3..f3b17f1581eaecb6f80d9baeaf63d04086c6ae79 100644 (file)
@@ -566,6 +566,10 @@ AP_DECLARE(void) ap_no2slash_ex(char *name, int is_fs_path)
 
     char *d, *s;
 
+    if (!name || !*name) {
+        return;
+    }
+
     s = d = name;
 
 #ifdef HAVE_UNC_PATHS