cpplex.c (_cpp_scan_line): Fix buffer overwrite.
authorScott Bambrough <scottb@netwinder.org>
Fri, 28 Apr 2000 18:17:54 +0000 (18:17 +0000)
committerScott Bambrough <scottb@gcc.gnu.org>
Fri, 28 Apr 2000 18:17:54 +0000 (18:17 +0000)
2000-04-28  Scott Bambrough  <scottb@netwinder.org>

* cpplex.c (_cpp_scan_line): Fix buffer overwrite.

From-SVN: r33514

gcc/ChangeLog
gcc/cpplex.c

index 67669d3e226579d885f8bd74d1b3da318f2b3c22..8eeb6ac33173ed25bb7baad2fe32fc39748464c8 100644 (file)
@@ -1,3 +1,7 @@
+2000-04-28  Scott Bambrough  <scottb@netwinder.org>
+
+       * cpplex.c (_cpp_scan_line): Fix buffer overwrite.
+
 2000-04-28  Richard Henderson  <rth@cygnus.com>
 
        * toplev.c (rest_of_type_compilation): Fix sdb TIMEVAR typo.
index 11a88e1b47a1f4561ceb810e9e379a1c716f2143..182ab2530989edf36b6b04ada84e89adad8ebade 100644 (file)
@@ -532,7 +532,7 @@ _cpp_scan_line (pfile, list)
       if (list->tokens_used >= list->tokens_cap)
        expand_token_space (list);
       if (list->name_used + len >= list->name_cap)
-       auto_expand_name_space (list);
+       expand_name_space (list, list->name_used + len + 1 - list->name_cap);
 
       if (type == CPP_MACRO)
        type = CPP_NAME;