aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2001-12-03 19:30:39 +0000
committerMichael Snyder <msnyder@vmware.com>2001-12-03 19:30:39 +0000
commit045f55a687792c820922c9f00a2ea5a6ec9625d2 (patch)
treeff25c978ce98b8e9fb247c08709cfaccfa9230f7
parentfdce74141981b8f9243602ee10496d7a77f6025f (diff)
downloadgdb-045f55a687792c820922c9f00a2ea5a6ec9625d2.zip
gdb-045f55a687792c820922c9f00a2ea5a6ec9625d2.tar.gz
gdb-045f55a687792c820922c9f00a2ea5a6ec9625d2.tar.bz2
2001-12-03 Michael Snyder <msnyder@redhat.com>
* symtab.c (search_symbols): Make sure alloca size is big enough.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/symtab.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 739b51b..011d830 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2001-12-03 Michael Snyder <msnyder@redhat.com>
+
+ * symtab.c (search_symbols): Make sure alloca size is big enough.
+
2001-12-03 Andrew Cagney <ac131313@redhat.com>
* MAINTAINERS: Prune m68k targets down to just m68k-elf.
diff --git a/gdb/symtab.c b/gdb/symtab.c
index ef4db9d..d11daba 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -2421,7 +2421,7 @@ search_symbols (char *regexp, namespace_enum kind, int nfiles, char *files[],
/* If wrong number of spaces, fix it. */
if (fix >= 0)
{
- char *tmp = (char *) alloca (strlen (regexp) + fix);
+ char *tmp = (char *) alloca (8 + fix + strlen (opname) + 1);
sprintf (tmp, "operator%.*s%s", fix, " ", opname);
regexp = tmp;
}