]> gcc.gnu.org Git - gcc.git/commitdiff
re PR preprocessor/6844 (Seg fault when trying to preprocess a file with lots of...
authorNeil Booth <neil@daikokuya.demon.co.uk>
Wed, 29 May 2002 19:30:07 +0000 (19:30 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Wed, 29 May 2002 19:30:07 +0000 (19:30 +0000)
PR preprocessor/6844
* cppmacro.c (cpp_macro_definition): Reserve space for terminating
NUL.

From-SVN: r54014

gcc/ChangeLog
gcc/cppmacro.c

index e0f7c726502d979d9d1595caf957fb1eb63315cc..8b9cce85f9890036d456949fb4f1524fa3394f22 100644 (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
index d154c0ccb85d8bfaff2cf7024398ce0a086e71a8..28095f25e9e2737e73b80be7d6fd0279ba1f51e1 100644 (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
This page took 0.078251 seconds and 5 git commands to generate.