From e5d3a45b48dc2a7002b92ef32f535d37add1c355 Mon Sep 17 00:00:00 2001 From: amacleod Date: Tue, 20 Oct 1998 12:30:45 +0000 Subject: [PATCH] Tue Oct 20 12:29:02 1998 Andreas Schwab * cplus-dem.c (demangle_qualified): Fix off-by-one when checking range of 'K' index. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23202 138bc75d-0d04-0410-961f-82ee72b054a4 --- libiberty/ChangeLog | 5 +++++ libiberty/cplus-dem.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 271b859c4e5..bbc34726c87 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 20 12:29:02 1998 Andreas Schwab + + * cplus-dem.c (demangle_qualified): Fix off-by-one when checking + range of 'K' index. + Thu Oct 15 18:51:12 1998 Kaveh R. Ghazi * choose-temp.c: Prototype mkstemps() when IN_GCC. diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index 079c8a77d22..35e49384ad2 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -2271,7 +2271,7 @@ demangle_qualified (work, mangled, result, isfuncname, append) int idx; (*mangled)++; idx = consume_count_with_underscores (mangled); - if (idx == -1 || idx > work -> numk) + if (idx == -1 || idx >= work -> numk) success = 0; else string_append (&temp, work -> ktypevec[idx]); @@ -2359,7 +2359,7 @@ demangle_qualified (work, mangled, result, isfuncname, append) int idx; (*mangled)++; idx = consume_count_with_underscores (mangled); - if (idx == -1 || idx > work->numk) + if (idx == -1 || idx >= work->numk) success = 0; else string_append (&temp, work->ktypevec[idx]); -- 2.11.4.GIT