cpplex.c (_cpp_read_and_prescan): Enlarge len by setting it to offset * 2.

* cpplex.c (_cpp_read_and_prescan): Enlarge len by setting it
	to offset * 2.

From-SVN: r33183
This commit is contained in:
Zack Weinberg 2000-04-16 07:35:39 +00:00 committed by Zack Weinberg
parent 5ead1006da
commit 1b955cbad5
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2000-04-15 Zack Weinberg <zack@wolery.cumb.org>
* cpplex.c (_cpp_read_and_prescan): Enlarge len by setting it
to offset * 2.
* cpplex.c (output_line_command): Remove debugging prints.
(cpp_output_tokens): Don't write out a zero-length buffer or
try to see if it has a newline in it.

View File

@ -1651,7 +1651,7 @@ _cpp_read_and_prescan (pfile, fp, desc, len)
{
size_t delta_op;
size_t delta_line_base;
len *= 2;
len = offset * 2;
if (offset > len)
/* len overflowed.
This could happen if the file is larger than half the