diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/coff-rs6000.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 584f087..14ed147 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com> + + * coff-rs6000.c (xcoff_write_archive_contents_old): Use + 'memcpy' instead of 'strncpy' when writing the magic number. + 2018-02-06 Nick Clifton <nickc@redhat.com> PR 22794 diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index 2fc1feb..d02835e 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -2090,7 +2090,7 @@ xcoff_write_archive_contents_old (bfd *abfd) char decbuf[XCOFFARMAG_ELEMENT_SIZE + 1]; memset (&fhdr, 0, sizeof fhdr); - (void) strncpy (fhdr.magic, XCOFFARMAG, SXCOFFARMAG); + (void) memcpy (fhdr.magic, XCOFFARMAG, SXCOFFARMAG); sprintf (fhdr.firstmemoff, "%d", SIZEOF_AR_FILE_HDR); sprintf (fhdr.freeoff, "%d", 0); |