diff options
author | Nils-Christian Kempke <nils-christian.kempke@intel.com> | 2022-07-13 11:23:36 +0200 |
---|---|---|
committer | Ijaz, Abdul B <abdul.b.ijaz@intel.com> | 2023-12-29 11:28:35 +0100 |
commit | 06740cf11f601c6a5a0f3807f37aaac31d13a542 (patch) | |
tree | d9ec5dbfcff697493a1a782dcc3dd42903e997dd | |
parent | 69570475c6142c656640106ff0f6ff13c20ae621 (diff) | |
download | fsf-binutils-gdb-06740cf11f601c6a5a0f3807f37aaac31d13a542.zip fsf-binutils-gdb-06740cf11f601c6a5a0f3807f37aaac31d13a542.tar.gz fsf-binutils-gdb-06740cf11f601c6a5a0f3807f37aaac31d13a542.tar.bz2 |
gdb, dwarf: add assert to dwarf2_get_pc_bounds
In dwarf2_get_pc_bounds we were writing unchecked to *lowpc. This
commit adds a gdb_assert to first check that lowpc != nullptr.
Approved-by: Tom Tromey <tom@tromey.com>
-rw-r--r-- | gdb/dwarf2/read.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 59a6500..6d95874 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -11092,6 +11092,7 @@ dwarf2_get_pc_bounds (struct die_info *die, unrelocated_addr *lowpc, && !per_objfile->per_bfd->has_section_at_zero) return PC_BOUNDS_INVALID; + gdb_assert (lowpc != nullptr); *lowpc = low; if (highpc != nullptr) *highpc = high; |