diff options
author | Alan Modra <amodra@gmail.com> | 2007-01-12 03:12:56 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-01-12 03:12:56 +0000 |
commit | 7bd7b3eff2840d8309852c8a4091cb3b589fccd8 (patch) | |
tree | b46abc70cdcb900c0dc2719375d2054ec5301f6c /binutils/readelf.c | |
parent | 0bbe7a79f595b156a9a9ab3042f44d7218b933e0 (diff) | |
download | gdb-7bd7b3eff2840d8309852c8a4091cb3b589fccd8.zip gdb-7bd7b3eff2840d8309852c8a4091cb3b589fccd8.tar.gz gdb-7bd7b3eff2840d8309852c8a4091cb3b589fccd8.tar.bz2 |
* ar.c (open_inarch): Check fwrite return. Use size_t.
(extract_file): Likewise. Remove test for "negative" file size.
* readelf.c (process_program_headers): Check fscanf return.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index 8f19a32..a4ade9d 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -3520,7 +3520,8 @@ process_program_headers (FILE *file) error (_("Internal error: failed to create format string to display program interpreter")); program_interpreter[0] = 0; - fscanf (file, fmt, program_interpreter); + if (fscanf (file, fmt, program_interpreter) <= 0) + error (_("Unable to read program interpreter name\n")); if (do_segments) printf (_("\n [Requesting program interpreter: %s]"), |