+2008-11-25 Nick Clifton <nickc@redhat.com>
+
+ PR7044
+ * 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-11-21 Sterling Augustine <sterling@tensilica.com>
* MAINTAINERS: Take over from Bob Wilson as Xtensa maintainer.
if (pid == -1)
{
- inform (strerror (errno));
+ inform ("%s", strerror (errno));
fatal (errmsg_fmt, errmsg_arg);
}
bfd_vma addr;
bfd_vma need[PAGE_SIZE];
bfd_vma page_addr;
- int numbytes;
+ bfd_size_type numbytes;
int num_entries;
bfd_vma *copy;
int j;
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 (bfd_vma);
unichar *u;
rc_uint_type ul;
char *buff;
- long flen;
+ bfd_size_type flen;
FILE *fp = fopen (input_filename, "rb");
if (!fp)
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)
{