diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/archive.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 34bee4f..9db6ed3 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2012-05-16 Alan Modra <amodra@gmail.com> + * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf + stops at end of ar_size field. + +2012-05-16 Alan Modra <amodra@gmail.com> + PR ld/13962 PR ld/7023 * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is diff --git a/bfd/archive.c b/bfd/archive.c index fd44f54..eb5f5ec 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -471,6 +471,7 @@ _bfd_generic_read_ar_hdr_mag (bfd *abfd, const char *mag) } errno = 0; + hdr.ar_fmag[0] = 0; if (sscanf (hdr.ar_size, "%" BFD_VMA_FMT "u", &parsed_size) != 1) { bfd_set_error (bfd_error_malformed_archive); |