PR gprof/20499
	* corefile.c (core_create_syms_from): Avoid walking off the end of
	the symbol table.
+2016-08-22  Nick Clifton  <nickc@redhat.com>
+
+       PR gprof/20499
+       * corefile.c (core_create_syms_from): Avoid walking off the end of
+       the symbol table.
+
 2016-07-21  H.J. Lu  <hongjiu.lu@intel.com>
 
        * configure: Regenerated.
 
         if (type != 't' && type != 'T')
           continue;
 
+      /* PR 20499 */
+      if ((symtab.limit - symtab.base) >= symtab.len)
+       {
+         fprintf (stderr, _("%s: too many symbols in file '%s'\n"), whoami, sym_table_file);
+         done (1);
+       }
+
       sym_init (symtab.limit);
 
       sscanf (address, "%" BFD_VMA_FMT "x", &(symtab.limit->addr) );