From: Ruediger Pluem Date: Wed, 18 Aug 2021 14:35:41 +0000 (+0000) Subject: * Follow the same logic that is used for calculating the length X-Git-Tag: 2.5.0-alpha2-ci-test-only~869 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0fec7d48dab1924c5a6b48819ce1cf420733f62;p=thirdparty%2Fapache%2Fhttpd.git * Follow the same logic that is used for calculating the length git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892418 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util.c b/server/util.c index e44e39afe3e..6bc5063bc39 100644 --- a/server/util.c +++ b/server/util.c @@ -2621,13 +2621,12 @@ AP_DECLARE(char *) ap_escape_quotes(apr_pool_t *p, const char *instring) * in front of every " that doesn't already have one. */ while (*inchr != '\0') { - while ((*inchr == '\\') && (inchr[1] != '\0')) { - *outchr++ = *inchr++; - *outchr++ = *inchr++; - } if (*inchr == '"') { *outchr++ = '\\'; } + if ((*inchr == '\\') && (inchr[1] != '\0')) { + *outchr++ = *inchr++; + } if (*inchr != '\0') { *outchr++ = *inchr++; }