diff options
author | edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-09-30 16:08:53 +0000 |
---|---|---|
committer | edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-09-30 16:08:53 +0000 |
commit | 2cb897aac5c37417a0d9df7bf097a0d0d97eef79 (patch) | |
tree | ab32b139b652fc4cee08f6e47ca2d986547e773f /libcpp/errors.c | |
parent | a226bafb7f8eee2bd325ef9f94074cdbb53cbff0 (diff) |
2014-09-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR preprocessor/58893
* errors.c (cpp_diagnostic): Fix possible out of bounds access.
* files.c (_cpp_stack_include): Initialize src_loc for IT_CMDLINE.
testsuite:
2014-09-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR preprocessor/58893
* gcc.dg/pr58893.c: New test case.
* gcc.dg/pr58893-0.h: New include.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215730 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/errors.c')
-rw-r--r-- | libcpp/errors.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libcpp/errors.c b/libcpp/errors.c index d1ca7a12ff42..bc857f0b81d5 100644 --- a/libcpp/errors.c +++ b/libcpp/errors.c @@ -48,10 +48,7 @@ cpp_diagnostic (cpp_reader * pfile, int level, int reason, current run -- that is invalid. */ else if (pfile->cur_token == pfile->cur_run->base) { - if (pfile->cur_run->prev != NULL) - src_loc = pfile->cur_run->prev->limit->src_loc; - else - src_loc = 0; + src_loc = 0; } else { |