Skip to content

Commit bf455af

Browse files
committed
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
1 parent ac6cb87 commit bf455af

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

modules/filters/mod_include.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,18 +1899,12 @@ static int parse_expr(request_rec *r, include_ctx_t *ctx, const char *expr,
18991899
}
19001900
switch (current->token.type) {
19011901
case token_string:
1902-
if (current->token.value[0] != '\0') {
1903-
strncat(current->token.value, " ",
1904-
/* XXX sizeof() use is FUBAR */
1905-
sizeof(current->token.value)
1906-
- strlen(current->token.value) - 1);
1907-
}
1908-
strncat(current->token.value, new->token.value,
1909-
/* XXX sizeof() use is FUBAR */
1910-
sizeof(current->token.value)
1911-
- strlen(current->token.value) - 1);
1912-
/* XXX sizeof() use is FUBAR */
1913-
current->token.value[sizeof(current->token.value) - 1] = '\0';
1902+
current->token.value = apr_pstrcat(r->pool,
1903+
current->token.value,
1904+
current->token.value[0] ? " " : "",
1905+
new->token.value,
1906+
NULL);
1907+
19141908
break;
19151909
case token_eq:
19161910
case token_ne:

0 commit comments

Comments
 (0)