aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c2
1 files changed, 1 insertions, 1 deletions
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;
}