+2008-12-01 Nick Clifton <nickc@redhat.com>
+
+ PR 7044
+ * dlltool.c (run): Use formatting string to avoid compile time
+ warning.
+ (gen_exp_file): Check return value from fread.
+ * windmc.c (main): Check return value from fread.
+
2008-09-25 Richard Henderson <rth@redhat.com>
* dwarf.c (size_of_encoded_value, get_encoded_value): Move up.
if (pid == -1)
{
- inform (strerror (errno));
+ inform ("%s", strerror (errno));
fatal (errmsg_fmt, errmsg_arg);
}
numbytes = ftell (base_file);
fseek (base_file, 0, SEEK_SET);
copy = xmalloc (numbytes);
- fread (copy, 1, numbytes, base_file);
+ if (fread (copy, 1, numbytes, base_file) < numbytes)
+ fatal (_("failed to read the number of entries from base file"));
num_entries = numbytes / sizeof (long);
-
fprintf (f, "\t.section\t.reloc\n");
if (num_entries)
{
fseek (fp, 0, SEEK_SET);
buff = malloc (flen + 3);
memset (buff, 0, flen + 3);
- fread (buff, 1, flen, fp);
+ if (fread (buff, 1, flen, fp) < flen)
+ fatal (_("unable to read contents of %s"), input_filename);
fclose (fp);
if (mcset_text_in_is_unicode != 1)
{