diff options
author | Nick Clifton <nickc@redhat.com> | 2014-12-16 14:17:15 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-12-16 14:17:15 +0000 |
commit | 033539e2685156ad6ad60e5925bc61cef5ced483 (patch) | |
tree | acdba5d5519157286fb6d5767b9690032f84f5e3 /bfd/format.c | |
parent | beed38b8273fa18be574a7e84d5d2ee1f563ed48 (diff) | |
download | gdb-033539e2685156ad6ad60e5925bc61cef5ced483.zip gdb-033539e2685156ad6ad60e5925bc61cef5ced483.tar.gz gdb-033539e2685156ad6ad60e5925bc61cef5ced483.tar.bz2 |
Fix a memory access violation triggeed by a fuzzed binary.
PR binutils/17512
* format.c (bfd_check_format_matches): Check for a matching vector
before using match priorities.
* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Fix off-by-one
errors with previous delta.
Diffstat (limited to 'bfd/format.c')
-rw-r--r-- | bfd/format.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/format.c b/bfd/format.c index c4bc944..f0d1e66 100644 --- a/bfd/format.c +++ b/bfd/format.c @@ -402,7 +402,7 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) /* We still have more than one equally good match, and at least some of the targets support match priority. Choose the first of the best matches. */ - if (match_count > 1 && best_count != match_count) + if (matching_vector && match_count > 1 && best_count != match_count) { int i; |