diff options
Diffstat (limited to 'libdw/dwarf_frame_register.c')
-rw-r--r-- | libdw/dwarf_frame_register.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libdw/dwarf_frame_register.c b/libdw/dwarf_frame_register.c index bcf3fa03..a6b7c4c1 100644 --- a/libdw/dwarf_frame_register.c +++ b/libdw/dwarf_frame_register.c @@ -100,6 +100,11 @@ dwarf_frame_register (Dwarf_Frame *fs, int regno, Dwarf_Op ops_mem[3], const uint8_t *p = fs->cache->data->d.d_buf + reg->value; const uint8_t *end = (fs->cache->data->d.d_buf + fs->cache->data->d.d_size); + if (p >= end) + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } get_uleb128 (block.length, p, end); block.data = (void *) p; |