PR preprocessor/3260
* cppmacro.c (make_string_token): Null terminate.
From-SVN: r43492
+2001-06-21 Neil Booth <neil@cat.daikokuya.demon.co.uk>
+
+ * cppmacro.c (make_string_token): Null terminate.
+
2001-06-21 DJ Delorie <dj@redhat.com>
* config/alpha/alpha.h (struct machine_function): Remove.
const U_CHAR *text;
unsigned int len;
{
- U_CHAR *buf = _cpp_pool_alloc (pool, len * 4);
+ U_CHAR *buf = _cpp_pool_alloc (pool, len * 4 + 1);
token->type = CPP_STRING;
token->val.str.text = buf;
token->val.str.len = quote_string (buf, text, len) - buf;
+ token->val.str.text[token->val.str.len] = '\0';
token->flags = 0;
}