aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cplus-dem.c
diff options
context:
space:
mode:
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
{