Blame SOURCES/httpd-2.4.34-CVE-2021-39275.patch

879b17
diff --git a/server/util.c b/server/util.c
879b17
index 1549ab1..e53bdc1 100644
879b17
--- a/server/util.c
879b17
+++ b/server/util.c
879b17
@@ -2460,13 +2460,12 @@ AP_DECLARE(char *) ap_escape_quotes(apr_pool_t *p, const char *instring)
879b17
      * in front of every " that doesn't already have one.
879b17
      */
879b17
     while (*inchr != '\0') {
879b17
-        if ((*inchr == '\\') && (inchr[1] != '\0')) {
879b17
-            *outchr++ = *inchr++;
879b17
-            *outchr++ = *inchr++;
879b17
-        }
879b17
         if (*inchr == '"') {
879b17
             *outchr++ = '\\';
879b17
         }
879b17
+        if ((*inchr == '\\') && (inchr[1] != '\0')) {
879b17
+            *outchr++ = *inchr++;
879b17
+        }
879b17
         if (*inchr != '\0') {
879b17
             *outchr++ = *inchr++;
879b17
         }