+2012-12-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/14933
+ * archive.c (bsd_write_armap): Properly check indicies bigger
+ than 4Gb.
+
2012-12-07 Alan Modra <amodra@gmail.com>
PR ld/14926
unsigned int count;
struct ar_hdr hdr;
long uid, gid;
- file_ptr max_first_real = 1;
-
- max_first_real <<= 31;
firstreal = mapsize + elength + sizeof (struct ar_hdr) + SARMAG;
for (count = 0; count < orl_count; count++)
{
+ unsigned int offset;
bfd_byte buf[BSD_SYMDEF_SIZE];
if (map[count].u.abfd != last_elt)
/* The archive file format only has 4 bytes to store the offset
of the member. Check to make sure that firstreal has not grown
too big. */
- if (firstreal >= max_first_real)
+ offset = (unsigned int) firstreal;
+ if (firstreal != (file_ptr) offset)
{
bfd_set_error (bfd_error_file_truncated);
return FALSE;