This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/55380] All search_line_fast implementations read beyond buffer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]