diff options
author | rodrigc <rodrigc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-12 23:08:07 +0000 |
---|---|---|
committer | rodrigc <rodrigc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-12 23:08:07 +0000 |
commit | 4e3ed5344de7ed858fa93e6c4bf41835f88ca400 (patch) | |
tree | b192ec432e8c46f8521679d7ac242152721f3681 /libiberty | |
parent | 298a9306b7dab0d8d6b1625a594c564e5c257a10 (diff) | |
download | gcc-4e3ed5344de7ed858fa93e6c4bf41835f88ca400.tar.gz |
2001-12-12 Craig Rodrigues <rodrigc@gcc.gnu.org>
PR other/2719
* cplus-dem.c (consume_count): Treat negative count as an error.
* testsuite/demangle-expected: Added testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47952 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 6 | ||||
-rw-r--r-- | libiberty/cplus-dem.c | 3 | ||||
-rw-r--r-- | libiberty/testsuite/demangle-expected | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 3ada1745783..f3a748df53f 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2001-12-12 Craig Rodrigues <rodrigc@gcc.gnu.org> + + PR other/2719 + * cplus-dem.c (consume_count): Treat negative count as an error. + * testsuite/demangle-expected: Added testcase. + Tue Dec 11 07:08:57 2001 Douglas B. Rupp <rupp@gnat.com> * configure.in: Hardcode that vfork works on VMS host. diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index a35ff14624e..159f8d5aef0 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -574,6 +574,9 @@ consume_count (type) (*type)++; } + if (count < 0) + count = -1; + return (count); } diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index 4953c7d1103..3a828472de1 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -2586,3 +2586,7 @@ JArray.t(JArray[]) --format=java _ZN4Prim1iEibcdfwPN4java4lang6StringEsx Prim.i(int, boolean, byte, double, float, char, java.lang.String, short, long) +# +--format=hp +_Utf58_0_1__1_2147483647__2147483648 +_Utf58_0_1__1_2147483647__2147483648 |