Fix an illegal memory access when parsing corrupt DWARF debug information.
[deliverable/binutils-gdb.git] / binutils / dwarf.c
index 598f8562abf2bee8b8a9240ec3cf118f6ba12fc2..c2e73f72fe8495c395d68f666e0d8d3a8907b247 100644 (file)
@@ -3267,6 +3267,7 @@ process_debug_info (struct dwarf_section *           section,
 
       if ((do_loc || do_debug_loc || do_debug_ranges)
          && num_debug_info_entries == 0
+         && alloc_num_debug_info_entries > unit
          && ! do_types)
        {
          debug_information [unit].cu_offset = cu_offset;
This page took 0.023541 seconds and 4 git commands to generate.