From: Jeff Trawick Date: Wed, 13 Mar 2002 20:41:48 +0000 (+0000) Subject: fix the remaining sizeof(token.value) bogosity X-Git-Tag: CHANGES~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52e9962a8ec6020e4965c9eab64aeeec572b1e8d;p=thirdparty%2Fapache%2Fhttpd.git 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 ab89e5b36ef..e8416e557c4 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: