aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cplus-dem.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1998-02-22 09:53:40 -0700
committerJeff Law <law@gcc.gnu.org>1998-02-22 09:53:40 -0700
commit5890bc92d41b13a99c7a3349daa9a2e2162b1ce2 (patch)
tree9e6cc52ea62e2e8f7e22e2dd2c053cdc0084a8f3 /libiberty/cplus-dem.c
parent8b715b2abcb3991955cb800e07144f6d6b7c6595 (diff)
downloadgcc-5890bc92d41b13a99c7a3349daa9a2e2162b1ce2.zip
gcc-5890bc92d41b13a99c7a3349daa9a2e2162b1ce2.tar.gz
gcc-5890bc92d41b13a99c7a3349daa9a2e2162b1ce2.tar.bz2
cplus-dem.c (gnu_special): Don't get confused by .<digits> strings that are not actually lengths.
* cplus-dem.c (gnu_special): Don't get confused by .<digits> strings that are not actually lengths. * config/mh-cygwin32: remove vasprintf.o from EXTRA_OFILES since it gets built automatically * vasprintf.c (int_vasprintf): Increase buffer size for float/double values. From-SVN: r18171
Diffstat (limited to 'libiberty/cplus-dem.c')
-rw-r--r--libiberty/cplus-dem.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
index ed16c86..f4d7123 100644
--- a/libiberty/cplus-dem.c
+++ b/libiberty/cplus-dem.c
@@ -1692,6 +1692,15 @@ gnu_special (work, mangled, declp)
if (isdigit(*mangled[0]))
{
n = consume_count(mangled);
+ /* We may be seeing a too-large size, or else a
+ ".<digits>" 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))
+ {
+ success = 1;
+ break;
+ }
}
else
{