Error when 32-bit ar tries to handle 4G or larger files
authorAlan Modra <amodra@gmail.com>
Fri, 15 Sep 2017 00:52:13 +0000 (10:22 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 15 Sep 2017 01:06:40 +0000 (10:36 +0930)
commit21d0a60620b306d6471ddedff04ac23912596cc6
tree3f6bacef41f452a3947e289c61d99a2d379139e9
parentcc3e190059e6c817203049a52c8bc4b37b58ce74
Error when 32-bit ar tries to handle 4G or larger files

We used to silently truncate the size returned by stat() to 32 bits.
While it is possible to make binutils handle a 64-bit off_t on a
32-bit host, to me the effort needed doesn't seem worth the benefit.
Instead, error if we truncate the size.  I've written the test the way
I have to avoid a signed/unsigned warning.

PR 22116
* archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
overflows bfd_size_type.
bfd/ChangeLog
bfd/archive.c
This page took 0.024986 seconds and 4 git commands to generate.