diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-08 12:06:59 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-08 12:06:59 +0000 |
commit | 053ec2207203a194d2ae82e2f164009aad3f14d2 (patch) | |
tree | b50eee4ce2fe502d34cd28aa2505a3409987c65c /libiberty | |
parent | fcfbb12900893b981929feb19207b231bc664325 (diff) | |
download | gcc-053ec2207203a194d2ae82e2f164009aad3f14d2.tar.gz |
Handle an overflow case (PR70498, patch by Marcel Böhme).
PR c++/70498
* cplus-dem.c (gnu_special): Handle case where consume_count returns
-1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234828 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 6 | ||||
-rw-r--r-- | libiberty/cplus-dem.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 1e59c537aeb..8e82a5fd776 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2016-04-08 Marcel Böhme <boehme.marcel@gmail.com> + + PR c++/70498 + * cplus-dem.c (gnu_special): Handle case where consume_count returns + -1. + 2016-03-31 Mikhail Maltsev <maltsevm@gmail.com> Marcel Bohme boehme.marcel@gmail.com diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index 7ab46ddac48..abba234f04c 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -3001,6 +3001,11 @@ gnu_special (struct work_stuff *work, const char **mangled, string *declp) success = 1; break; } + else if (n == -1) + { + success = 0; + break; + } } else { |