]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
There is no point in calling ap_varbuf_grow() here, it is already
authorChristophe Jaillet <jailletc36@apache.org>
Mon, 21 Feb 2022 21:07:35 +0000 (21:07 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Mon, 21 Feb 2022 21:07:35 +0000 (21:07 +0000)
called from within ap_varbuf_strmemcat().

Moreover, 2nd parameter should be the minimum total new length, not
the amount of the growth. So this call is likely to be a no-op.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898286 13f79535-47bb-0310-9956-ffa450edef68

server/util_expr_eval.c

index 823978d2f344d3614994fb424761c305fd6952d6..9c71e865b0f85104e050de78466f89b4891713b7 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-/*                      _             _
+/*
  *  ap_expr_eval.c, based on ssl_expr_eval.c from mod_ssl
  */
 
@@ -124,7 +124,6 @@ static const char *ap_expr_list_pstrcat(apr_pool_t *p,
         for (i = 0; i < n; ++i) {
             val = APR_ARRAY_IDX(list, i, const char*);
             vlen = strlen(val);
-            ap_varbuf_grow(&vb, vlen + slen + 1);
             ap_varbuf_strmemcat(&vb, val, vlen);
             ap_varbuf_strmemcat(&vb, sep, slen);
         }