From: Jeff Trawick Date: Wed, 13 Mar 2002 20:41:48 +0000 (+0000) Subject: fix the remaining sizeof(token.value) bogosity X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf455afa5cc2932e1767d44f8d4e463a512fc0b7;p=apache fix the remaining sizeof(token.value) bogosity git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93917 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index ab89e5b36e..e8416e557c 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -1899,18 +1899,12 @@ static int parse_expr(request_rec *r, include_ctx_t *ctx, const char *expr, } switch (current->token.type) { case token_string: - if (current->token.value[0] != '\0') { - strncat(current->token.value, " ", - /* XXX sizeof() use is FUBAR */ - sizeof(current->token.value) - - strlen(current->token.value) - 1); - } - strncat(current->token.value, new->token.value, - /* XXX sizeof() use is FUBAR */ - sizeof(current->token.value) - - strlen(current->token.value) - 1); - /* XXX sizeof() use is FUBAR */ - current->token.value[sizeof(current->token.value) - 1] = '\0'; + current->token.value = apr_pstrcat(r->pool, + current->token.value, + current->token.value[0] ? " " : "", + new->token.value, + NULL); + break; case token_eq: case token_ne: