PR gprof/11524

* corefile.c (core_create_syms_from): Use correct size of buffer.
This commit is contained in:
Nick Clifton 2010-04-27 14:46:09 +00:00
parent 4d9e2b2774
commit 1ad40a046a
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2010-04-27 Hongsheng Zhang <hongsheng611@gmail.com>
PR gprof/11524
* corefile.c (core_create_syms_from): Use correct size of buffer.
2010-04-22 Nick Clifton <nickc@redhat.com>
* po/gprof.pot: Updated by the Translation project.

View File

@ -1,7 +1,7 @@
/* corefile.c
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009,
2010 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@ -517,7 +517,7 @@ core_create_syms_from (const char * sym_table_file)
done (1);
}
while (!feof (f) && fgets (buf, sizeof (buf), f))
while (!feof (f) && fgets (buf, BUFSIZE - 1, f))
{
if (sscanf (buf, "%s %c %s", address, &type, name) == 3)
if (type != 't' && type != 'T')