[PATCH] fix ar/ranlib regression with ar_fmag clobberation
Thu May 17 23:51:00 GMT 2012
On Thu, May 17, 2012 at 01:45:37PM -0700, Roland McGrath wrote:
> This change:
> 2012-05-16 Alan Modra <firstname.lastname@example.org>
> * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf
> stops at end of ar_size field.
> results in clobbering the stored ar_fmag field. Among other things,
> this makes ranlib produce a malformed archive.
Doh! I looked at uses of hdr after that point, and missed seeing
memcpy (ared->arch_header, &hdr, sizeof (struct ar_hdr));
> * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as
> not to clobber the ar_fmag field stored in ARED->arch_header.
Australia Development Lab, IBM
More information about the Binutils