mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
Correct fscanf char field count
%<number>s as an fscanf format does not include the trailing NULL. PATH_MAX does include the trailing NULL. PR 17453 * readelf.c (process_program_headers): Correct fscanf format used for interpreter.
This commit is contained in:
parent
daf5e10e4c
commit
9495b2e66f
@ -1,3 +1,9 @@
|
||||
2014-10-14 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 17453
|
||||
* readelf.c (process_program_headers): Correct fscanf format used
|
||||
for interpreter.
|
||||
|
||||
2014-10-09 Jose E. Marchesi <jose.marchesi@oracle.com>
|
||||
|
||||
* readelf.c (display_sparc_hwcaps2): New function.
|
||||
@ -287,8 +293,8 @@
|
||||
|
||||
2014-03-14 Meador Inge <meadori@codesourcery.com>
|
||||
|
||||
* dwarf.c (strnlen): Move prototype ...
|
||||
* sysdep.h (strnlen): ... to here.
|
||||
* dwarf.c (strnlen): Move prototype ...
|
||||
* sysdep.h (strnlen): ... to here.
|
||||
|
||||
2014-03-12 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
|
@ -4394,7 +4394,7 @@ process_program_headers (FILE * file)
|
||||
else
|
||||
{
|
||||
char fmt [32];
|
||||
int ret = snprintf (fmt, sizeof (fmt), "%%%ds", PATH_MAX);
|
||||
int ret = snprintf (fmt, sizeof (fmt), "%%%ds", PATH_MAX - 1);
|
||||
|
||||
if (ret >= (int) sizeof (fmt) || ret < 0)
|
||||
error (_("Internal error: failed to create format string to display program interpreter\n"));
|
||||
|
Loading…
Reference in New Issue
Block a user