aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Bambrough <scottb@netwinder.org>2000-04-28 18:17:54 +0000
committerScott Bambrough <scottb@gcc.gnu.org>2000-04-28 18:17:54 +0000
commitbb1ec1d79f93c60072d6df7491af8a8259f21545 (patch)
treed75660ebdd8b102b9dd5896235e1917dd4e29419
parentd8d1d62b9042b249f02845986bcc152ca54fa28b (diff)
downloadgcc-bb1ec1d79f93c60072d6df7491af8a8259f21545.zip
gcc-bb1ec1d79f93c60072d6df7491af8a8259f21545.tar.gz
gcc-bb1ec1d79f93c60072d6df7491af8a8259f21545.tar.bz2
cpplex.c (_cpp_scan_line): Fix buffer overwrite.
2000-04-28 Scott Bambrough <scottb@netwinder.org> * cpplex.c (_cpp_scan_line): Fix buffer overwrite. From-SVN: r33514
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/cpplex.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 67669d3..8eeb6ac 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/cpplex.c b/gcc/cpplex.c
index 11a88e1..182ab25 100644
--- a/gcc/cpplex.c
+++ b/gcc/cpplex.c
@@ -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;