]> git.ipfire.org Git - thirdparty/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:26:04 +0000 (19:26 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Wed, 29 May 2002 19:26:04 +0000 (19:26 +0000)
PR preprocessor/6844
* cppmacro.c (cpp_macro_definition): Reserve space for terminating
NUL.

From-SVN: r54013

gcc/ChangeLog
gcc/cppmacro.c

index 08ddb875b17a16dea73347d651d53c16bb4df0c1..ef4468c584d62c639e52874b8193f9ad563c42d2 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  Joel Sherrill <joel@OARcorp.com>
 
        * config/rs6000/rs6000.h (ASM_CPU_SPEC): Use -m403 and -m405.
index e9f9e7ba7ad5e98739a28a7a087cc40c6cbf31bc..5a979d28b36550dcecfdf28f9ac3a8d2bd80339b 100644 (file)
@@ -1531,7 +1531,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