aboutsummaryrefslogtreecommitdiff
path: root/opcodes/m32r-desc.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-01-13 14:27:19 +1030
committerAlan Modra <amodra@gmail.com>2020-01-13 16:44:27 +1030
commitfebda64f152972d8edf0147fb29f89b02f6a4cf9 (patch)
tree530633bd36c29a3fd0715e8658777f665385aa9a /opcodes/m32r-desc.h
parentdf08b5881b4972d78f9a2069955dad5b12bc972e (diff)
downloadgdb-febda64f152972d8edf0147fb29f89b02f6a4cf9.zip
gdb-febda64f152972d8edf0147fb29f89b02f6a4cf9.tar.gz
gdb-febda64f152972d8edf0147fb29f89b02f6a4cf9.tar.bz2
ubsan: wasm32: signed integer overflow
The signed integer overflow occurred when adding one to target_count for (i = 0; i < target_count + 1; i++) but that's the least of the worries here. target_count was long and i int, leading to the possibility of a loop that never ended. So to avoid this type of vulnerability, this patch uses what I believe to be the proper types for arguments of various wasm32 opcodes, rather than using "long" which may change in size. gas/ * testsuite/gas/wasm32/allinsn.d: Update expected output. opcodes/ * wasm32-dis.c (print_insn_wasm32): Localise variables. Store result of wasm_read_leb128 in a uint64_t and check that bits are not lost when copying to other locals. Use uint32_t for most locals. Use PRId64 when printing int64_t.
Diffstat (limited to 'opcodes/m32r-desc.h')
0 files changed, 0 insertions, 0 deletions