[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gprof/11524] New: segmentation fault when use --external-symbol-tab
From: |
hongsheng611 at gmail dot com |
Subject: |
[Bug gprof/11524] New: segmentation fault when use --external-symbol-table option |
Date: |
21 Apr 2010 10:49:34 -0000 |
the bug is in the file: binutils-2.20/gprof/corefile.c
in the function: static int num_of_syms_in (FILE * f)
line 520: while (!feof (f) && fgets (buf, sizeof (buf), f))
this is wrong! because the type of buf is char *, so sizeof(buf)=4
this would cause segmentation fault when use --external-symbol-table option.
it should be changed to : while (!feof (f) && fgets (buf, BUFSIZE - 1, f))
--
Summary: segmentation fault when use --external-symbol-table
option
Product: binutils
Version: 2.20
Status: NEW
Severity: normal
Priority: P2
Component: gprof
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: hongsheng611 at gmail dot com
CC: bug-binutils at gnu dot org
GCC target triplet: x86-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=11524
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug gprof/11524] New: segmentation fault when use --external-symbol-table option,
hongsheng611 at gmail dot com <=