File apache2-CVE-2021-39275.patch of Package apache2.27541

Index: httpd-2.4.43/server/util.c
===================================================================
--- httpd-2.4.43.orig/server/util.c	2020-02-11 14:19:05.000000000 +0100
+++ httpd-2.4.43/server/util.c	2021-09-21 13:34:39.722006310 +0200
@@ -2493,13 +2493,12 @@ AP_DECLARE(char *) ap_escape_quotes(apr_
      * in front of every " that doesn't already have one.
      */
     while (*inchr != '\0') {
-        if ((*inchr == '\\') && (inchr[1] != '\0')) {
-            *outchr++ = *inchr++;
-            *outchr++ = *inchr++;
-        }
         if (*inchr == '"') {
             *outchr++ = '\\';
         }
+        if ((*inchr == '\\') && (inchr[1] != '\0')) {
+            *outchr++ = *inchr++;
+        }
         if (*inchr != '\0') {
             *outchr++ = *inchr++;
         }
openSUSE Build Service is sponsored by