* cpplib.c (_cpp_parse_assertion): Fix buffer overrun.

From-SVN: r34872
This commit is contained in:
Zack Weinberg 2000-07-05 18:12:42 +00:00 committed by Zack Weinberg
parent dca888c43e
commit 385d061bfe
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2000-07-05 Zack Weinberg <zack@wolery.cumb.org>
* cpplib.c (_cpp_parse_assertion): Fix buffer overrun.
2000-07-04 Zack Weinberg <zack@wolery.cumb.org>
* cpplex.c: Don't include sys/mman.h.

View file

@ -1322,8 +1322,8 @@ _cpp_parse_assertion (pfile, answerp)
lookup_node:
*answerp = answer;
len = predicate->val.name.len + 1;
sym = alloca (len);
len = predicate->val.name.len;
sym = alloca (len + 1);
/* Prefix '#' to get it out of macro namespace. */
sym[0] = '#';