2001-12-03 Michael Snyder <msnyder@redhat.com>

* symtab.c (search_symbols): Make sure alloca size is big enough.
This commit is contained in:
Michael Snyder 2001-12-03 19:30:39 +00:00
parent fdce741419
commit 045f55a687
2 changed files with 5 additions and 1 deletions

View File

@ -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.

View File

@ -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;
}