projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
101af53
)
* archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf
author
Alan Modra
<amodra@gmail.com>
Wed, 16 May 2012 13:00:29 +0000
(13:00 +0000)
committer
Alan Modra
<amodra@gmail.com>
Wed, 16 May 2012 13:00:29 +0000
(13:00 +0000)
stops at end of ar_size field.
bfd/ChangeLog
patch
|
blob
|
history
bfd/archive.c
patch
|
blob
|
history
diff --git
a/bfd/ChangeLog
b/bfd/ChangeLog
index 34bee4f160866225df36b5b4b608b0a7c182980c..9db6ed35ae3bbf3720350e0197cb2d6ec0bb92b7 100644
(file)
--- a/
bfd/ChangeLog
+++ b/
bfd/ChangeLog
@@
-1,3
+1,8
@@
+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
diff --git
a/bfd/archive.c
b/bfd/archive.c
index fd44f5405fef7661f9a35a1e0c8f3255865f2ca8..eb5f5ec0cfa80ddd199ae2baf00bafaf968b30e3 100644
(file)
--- 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);