This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/55380] All search_line_fast implementations read beyond buffer
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 03 Dec 2012 17:20:01 +0000
- Subject: [Bug bootstrap/55380] All search_line_fast implementations read beyond buffer
- Auto-submitted: auto-generated
- References: <bug-55380-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55380
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-03 17:20:01 UTC ---
Author: jakub
Date: Mon Dec 3 17:19:47 2012
New Revision: 194102
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194102
Log:
PR bootstrap/55380
PR other/54691
* files.c (read_file_guts): Allocate extra 16 bytes instead of
1 byte at the end of buf. Pass size + 16 instead of size
to _cpp_convert_input.
* charset.c (_cpp_convert_input): Reallocate if there aren't
at least 16 bytes beyond to.len in the buffer. Clear 16 bytes
at to.text + to.len.
Modified:
trunk/libcpp/ChangeLog
trunk/libcpp/charset.c
trunk/libcpp/files.c