* 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.
This commit is contained in:
Alan Modra
2007-01-12 03:12:56 +00:00
parent 0bbe7a79f5
commit 7bd7b3eff2
3 changed files with 19 additions and 14 deletions

View File

@@ -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]"),