[Bug c++/70926] Libiberty Demangler segfaults (5)

2016-07-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70926

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||law at redhat dot com
 Resolution|--- |FIXED

--- Comment #1 from Jeffrey A. Law  ---
Fixed by commit on trunk

[Bug c++/70926] Libiberty Demangler segfaults (5)

2016-07-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70926

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||law at redhat dot com
 Resolution|--- |FIXED

--- Comment #1 from Jeffrey A. Law  ---
Fixed by commit on trunk

--- Comment #2 from Jeffrey A. Law  ---
Author: law
Date: Wed Jul 13 22:06:09 2016
New Revision: 238313

URL: https://gcc.gnu.org/viewcvs?rev=238313=gcc=rev
Log:
PR c++/70926
* cplus-dem.c: Handle large values and overflow when demangling
length variables.
(demangle_template_value_parm): Read only until end of mangled string.
(do_hpacc_template_literal): Likewise.
(do_type): Handle overflow when demangling array indices.

Modified:
trunk/libiberty/ChangeLog
trunk/libiberty/cplus-dem.c
trunk/libiberty/testsuite/demangle-expected