"<!--#if" processing code, rather always allocating an 8KB structure
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92838
13f79535-47bb-0310-9956-
ffa450edef68
};
struct token {
enum token_type type;
- char value[MAX_STRING_LEN];
+ char* value;
};
-/* there is an implicit assumption here that string is at most MAX_STRING_LEN-1
- * characters long...
- */
static const char *get_ptoken(request_rec *r, const char *string,
struct token *token, int *unmatched)
{
char qs = 0;
int tkn_fnd = 0;
+ token->value = NULL;
+
/* Skip leading white space */
if (string == (char *) NULL) {
return (char *) NULL;
break;
}
/* We should only be here if we are in a string */
+ token->value = apr_palloc(r->pool, strlen(string) + 2); /* 2 for ch plus
+ trailing null */
if (!qs) {
token->value[next++] = ch;
}