aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c3
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]"),