This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/14438] Potential need for buffer overflow checks in _cpp_lex_direct
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Dec 2006 07:58:30 -0000
- Subject: [Bug preprocessor/14438] Potential need for buffer overflow checks in _cpp_lex_direct
- References: <bug-14438-665@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #25 from tromey at gcc dot gnu dot org 2006-12-29 07:58 -------
FWIW I've been looking at this area for PR 29966.
I don't see how overflow checking could be added to
_cpp_lex_direct. However I did end up adding an
assertion to _cpp_lex_token, to try to expose a hidden
assumption:
if (pfile->cur_token < pfile->cur_run->base
|| pfile->cur_token >= pfile->cur_run->limit)
abort ();
I also looked at the other assignments to cur_token
and (aside from the one fixed in my forthcoming patch)
they all look ok.
So, I think this PR can be closed.
Please reopen if you think I've done this in error.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu dot
| |org
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14438