From 7bf407413f0d6b36bd1a799fea2d5863465dafed Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 26 Apr 1998 15:41:36 +0000 Subject: [PATCH] cplus-dem.c (gnu_special): Fix off-by-one bug when checking the length in the name of a virtual table. * cplus-dem.c (gnu_special): Fix off-by-one bug when checking the length in the name of a virtual table. From-SVN: r19417 --- gcc/ChangeLog | 5 +++++ gcc/cplus-dem.c | 2 +- libiberty/ChangeLog | 5 +++++ libiberty/cplus-dem.c | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ed06f056e943..64d05dfae212 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sun Apr 26 15:38:50 1998 Andreas Schwab + + * cplus-dem.c (gnu_special): Fix off-by-one bug when checking the + length in the name of a virtual table. + Sun Apr 26 01:21:06 1998 Richard Henderson * alpha.c (print_operand): Don't add 'v' suffix for ALPHA_FPTM_N. diff --git a/gcc/cplus-dem.c b/gcc/cplus-dem.c index abc85bbe5d1c..21e3b6e1e0d8 100644 --- a/gcc/cplus-dem.c +++ b/gcc/cplus-dem.c @@ -2003,7 +2003,7 @@ gnu_special (work, mangled, declp) "." indicating a static local symbol. In any case, declare victory and move on; *don't* try to use n to allocate. */ - if (n >= strlen (*mangled)) + if (n > strlen (*mangled)) { success = 1; break; diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index acd96f248eba..1b98c559f48d 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +Sun Apr 26 15:38:50 1998 Andreas Schwab + + * cplus-dem.c (gnu_special): Fix off-by-one bug when checking the + length in the name of a virtual table. + Wed Apr 22 10:53:49 EDT 1998 Andrew MacLeod * cplus-dem.c (struct work stuff): Add field for B and K mangle codes. diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index abc85bbe5d1c..21e3b6e1e0d8 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -2003,7 +2003,7 @@ gnu_special (work, mangled, declp) "." indicating a static local symbol. In any case, declare victory and move on; *don't* try to use n to allocate. */ - if (n >= strlen (*mangled)) + if (n > strlen (*mangled)) { success = 1; break; -- 2.43.5