Backport of:

From c4ef468b25718a26f2b92cbea3ca093729b79331 Mon Sep 17 00:00:00 2001
From: Eric Covener <covener@apache.org>
Date: Mon, 18 Mar 2019 12:10:15 +0000
Subject: [PATCH] merge 1855743,1855744 ^/httpd/httpd/trunk .

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 | 4 +++-
 server/util.c    | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)

Index: apache2-2.4.7/server/request.c
===================================================================
--- apache2-2.4.7.orig/server/request.c	2019-04-03 11:06:40.260185865 -0400
+++ apache2-2.4.7/server/request.c	2019-04-03 11:06:40.256186182 -0400
@@ -195,7 +195,9 @@ AP_DECLARE(int) ap_process_request_inter
     ap_getparents(r->uri);     /* OK --- shrinking transformations... */
     if (sconf->merge_slashes != 0) { 
         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: apache2-2.4.7/server/util.c
===================================================================
--- apache2-2.4.7.orig/server/util.c	2019-04-03 11:06:40.260185865 -0400
+++ apache2-2.4.7/server/util.c	2019-04-03 11:06:40.256186182 -0400
@@ -566,6 +566,10 @@ AP_DECLARE(void) ap_no2slash_ex(char *na
 
     char *d, *s;
 
+    if (!name || !*name) {
+        return;
+    }
+
     s = d = name;
 
 #ifdef HAVE_UNC_PATHS
