diff options
author | Alan Modra <amodra@gmail.com> | 2020-08-25 17:46:59 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-08-25 23:07:10 +0930 |
commit | 8640c87dcd4528e19dc060bfac801f9084fbf4e2 (patch) | |
tree | 686711c73953b2cfb7bb07dcc4b8a660a5e91611 /opcodes/vax-dis.c | |
parent | 69ff2100fdf663e1a8fa996236f63ed7e0fac95c (diff) | |
download | gdb-8640c87dcd4528e19dc060bfac801f9084fbf4e2.zip gdb-8640c87dcd4528e19dc060bfac801f9084fbf4e2.tar.gz gdb-8640c87dcd4528e19dc060bfac801f9084fbf4e2.tar.bz2 |
PR26504, ASAN: parse_disassembler_options vax-dis.c:142
PR 26504
* vax-dis.c (parse_disassembler_options): Always add at least one
to entry_addr_total_slots.
Diffstat (limited to 'opcodes/vax-dis.c')
-rw-r--r-- | opcodes/vax-dis.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opcodes/vax-dis.c b/opcodes/vax-dis.c index f58c4ad..3efbf3d 100644 --- a/opcodes/vax-dis.c +++ b/opcodes/vax-dis.c @@ -129,8 +129,8 @@ parse_disassembler_options (const char *options) if (entry_addr_occupied_slots >= entry_addr_total_slots) { /* A guesstimate of the number of entries we will have to create. */ - entry_addr_total_slots += - strlen (options) / (strlen (entry_switch) + 5); + entry_addr_total_slots + += 1 + strlen (options) / (strlen (entry_switch) + 5); entry_addr = realloc (entry_addr, sizeof (bfd_vma) * entry_addr_total_slots); |