From 0b2d8352d25730408e9bfbbd5df7fca31d0fab82 Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 22 Sep 2006 13:52:29 +0000 Subject: PR other/29176 * cp-demangle.c (d_substitution): Check for overflow when computing substitution index. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117144 138bc75d-0d04-0410-961f-82ee72b054a4 --- libiberty/cp-demangle.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libiberty/cp-demangle.c') diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index c7ee8786d92..2fa59785f2f 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -2505,6 +2505,8 @@ d_substitution (struct d_info *di, int prefix) id = id * 36 + c - 'A' + 10; else return NULL; + if (id < 0) + return NULL; c = d_next_char (di); } while (c != '_'); -- cgit v1.2.1