gdb/dwarf: add missing bound check to read_loclist_index
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 2 Feb 2021 15:40:51 +0000 (10:40 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 2 Feb 2021 15:40:51 +0000 (10:40 -0500)
commit05787bad362024d1328c0d6f7c51244a7d6c1e75
treeb87949bde02828ff51b02657675027f4faabaacc
parent5e4d9bbc4b4e57eacb614c38f30dac9af08cace8
gdb/dwarf: add missing bound check to read_loclist_index

read_rnglist_index has a bound check to make sure that we don't go past
the end of the section while reading the offset, but read_loclist_index
doesn't.  Add it to read_loclist_index.

gdb/ChangeLog:

* dwarf2/read.c (read_loclist_index): Add bound check for the end
of the offset.

Change-Id: Ic4b55c88860fdc3e007740949c78ec84cdb4da60
gdb/ChangeLog
gdb/dwarf2/read.c