aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-19 14:20:23 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-19 14:20:23 -0400
commitf408d82c7a140268c3b7be35970c96d8385b5902 (patch)
tree7920efab8daf34e13bd9ddc8cce9c3d105935b0f /binutils/dwarf.c
parent98c59b527b1472b87a9ee4959c4bfae85061bc1d (diff)
downloadgdb-f408d82c7a140268c3b7be35970c96d8385b5902.zip
gdb-f408d82c7a140268c3b7be35970c96d8385b5902.tar.gz
gdb-f408d82c7a140268c3b7be35970c96d8385b5902.tar.bz2
gdb: fix off-by-one error in quirk_rust_enum
Found by inspection, so I don't have a test for it (I don't think it would be easy to have this bug cause a failure reliably). We allocate space for N fields into `new_fields`, then memcpy N fields at `new_fields + 1`. This overflows the allocated buffer by one field. Fix it by allocating `N + 1` fields. gdb/ChangeLog: * dwarf2/read.c (quirk_rust_enum): Allocate enough fields.
Diffstat (limited to 'binutils/dwarf.c')
0 files changed, 0 insertions, 0 deletions