diff options
author | Nick Clifton <nickc@redhat.com> | 2015-02-26 14:21:54 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-02-26 14:23:27 +0000 |
commit | c8071705c69a13d237aeca4709bf91deaff7e5cb (patch) | |
tree | d176a0f3d8569bb1a6a8d05686dbaa878fee1a54 /gdb/infcmd.c | |
parent | 03eddd80d7c9b406109c43c07741c9991520954b (diff) | |
download | gdb-c8071705c69a13d237aeca4709bf91deaff7e5cb.zip gdb-c8071705c69a13d237aeca4709bf91deaff7e5cb.tar.gz gdb-c8071705c69a13d237aeca4709bf91deaff7e5cb.tar.bz2 |
Fix undefined arithmetic operations detected by -fsanitize=undefined when running readelf on fuzzed binaries.
PR binutils/17512
* dwarf.c (display_debug_loc): Pacify the undefined behaviour
sanitizer by simplifying address difference calculation.
(struct Frame_Chunk): Change type of cfa_offset to dwarf_vma in
order to avoid arithmetic overflows.
(frame_display_row): Cast cfa_offset before printing it.
(display_debug_frames): Likewise.
Check for an unexpected segment size.
Chnage type of 'l' local to dwarf_vma and cast it back to an int
when printing.
(process_cu_tu_index): Tighten check for an invalid ncols value.
* readelf.c (process_corefile_note_segment): Check for
inote.descdata extending beyond the end of the section.
(process_v850_notes): Likewise.
Diffstat (limited to 'gdb/infcmd.c')
0 files changed, 0 insertions, 0 deletions