re PR preprocessor/6844 (Seg fault when trying to preprocess a file with lots of #define's)

PR preprocessor/6844
	* cppmacro.c (cpp_macro_definition): Reserve space for terminating
	NUL.

From-SVN: r54014
This commit is contained in:
Neil Booth 2002-05-29 19:30:07 +00:00 committed by Neil Booth
parent e793a7140e
commit 8dc901ded3
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2002-05-29 Neil Booth <neil@daikokuya.demon.co.uk>
PR preprocessor/6844
* cppmacro.c (cpp_macro_definition): Reserve space for terminating
NUL.
2002-05-29 Eric Christopher <echristo@redhat.com>
* config/mips/linux.h (SUBTARGET_CPP_SPEC): Add support for

View File

@ -1537,7 +1537,7 @@ cpp_macro_definition (pfile, node)
}
/* Calculate length. */
len = NODE_LEN (node) + 1; /* ' ' */
len = NODE_LEN (node) + 2; /* ' ' and NUL. */
if (macro->fun_like)
{
len += 4; /* "()" plus possible final ".." of named