aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd-dbgapi-target.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-02-27 14:53:22 +1030
committerAlan Modra <amodra@gmail.com>2023-02-28 10:37:12 +1030
commitf6389c5a793648f1b12cc791b8957cf6d1752222 (patch)
tree8de8bd0f15ece16e132688ab96ef1fdaf489c859 /gdb/amd-dbgapi-target.c
parent3f316bf83bc59299e96e1395793e6493d3ab9581 (diff)
downloadbinutils-f6389c5a793648f1b12cc791b8957cf6d1752222.zip
binutils-f6389c5a793648f1b12cc791b8957cf6d1752222.tar.gz
binutils-f6389c5a793648f1b12cc791b8957cf6d1752222.tar.bz2
Add some sanity checking in ECOFF lookup_line
More anti-fuzzer bounds checking for the ECOFF support. A lot of this is in ancient code using "long" for counts and sizes, which is why the patch uses "(long) ((unsigned long) x + 1) > 0" in a few places. The unsigned long cast is so that "x + 1" doesn't trigger ubsan warnings about signed integer overflow. It would be a good idea to replace most of the longs used in binutils with size_t, but that's more than I care to do for COFF/ECOFF. * ecofflink.c (mk_fdrtab): Sanity check string offsets. (lookup_line): Likewise, and symbol indices.
Diffstat (limited to 'gdb/amd-dbgapi-target.c')
0 files changed, 0 insertions, 0 deletions