2001-12-03 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Mon, 3 Dec 2001 19:30:39 +0000 (19:30 +0000)
committerMichael Snyder <msnyder@vmware.com>
Mon, 3 Dec 2001 19:30:39 +0000 (19:30 +0000)
* symtab.c (search_symbols): Make sure alloca size is big enough.

gdb/ChangeLog
gdb/symtab.c

index 739b51bb192c92d03129b65a6b2e4e3cb08fbc7a..011d8303a9de1601e33d28404a26067ba246b019 100644 (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.
index ef4db9dad2598103744f99f0ceb0d03a11d27a72..d11dabaf7b773d0812e385df16ec9113443fe02c 100644 (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;
            }
This page took 0.044387 seconds and 4 git commands to generate.