diff options
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r-- | libiberty/cp-demangle.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 != '_'); |