+2021-02-02 Simon Marchi <simon.marchi@efficios.com>
+
+ * dwarf2/read.c (read_loclist_index): Remove bound check for
+ start of offset.
+ (read_rnglist_index): Likewise.
+
2021-02-02 Simon Marchi <simon.marchi@efficios.com>
* dwarf2/read.c (read_loclist_index): Add bound check for the end
".debug_loclists offset array [in module %s]"),
objfile_name (objfile));
- if (start_offset >= section->size)
- error (_("DW_FORM_loclistx pointing outside of "
- ".debug_loclists section [in module %s]"),
- objfile_name (objfile));
-
/* Validate that reading won't go beyond the end of the section. */
if (start_offset + cu->header.offset_size > section->size)
error (_("Reading DW_FORM_loclistx index beyond end of"
".debug_rnglists offset array [in module %s]"),
objfile_name (objfile));
- /* Validate that the offset is within the section's range. */
- if (start_offset >= section->size)
- error (_("DW_FORM_rnglistx pointing outside of "
- ".debug_rnglists section [in module %s]"),
- objfile_name (objfile));
-
/* Validate that reading won't go beyond the end of the section. */
if (start_offset + cu->header.offset_size > section->size)
error (_("Reading DW_FORM_rnglistx index beyond end of"