Fix a memory access violation triggeed by a fuzzed binary.
[deliverable/binutils-gdb.git] / bfd / format.c
index c4bc94403864d70fcc0f698afe22adc0fcdc065f..f0d1e668c77d49406b3933b66327fccaa67742c1 100644 (file)
@@ -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;
 
This page took 0.025722 seconds and 4 git commands to generate.