diff options
author | Alan Modra <amodra@gmail.com> | 2023-02-22 09:57:53 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-02-22 10:01:10 +1030 |
commit | c65f94a07aee0c1c6745e079a613f2fefa79a657 (patch) | |
tree | d3a01f361121cb843653ec02634cead7bf8253a5 /binutils | |
parent | 45b36294d60e3c72c32f8003b82ee852672f1948 (diff) | |
download | gdb-c65f94a07aee0c1c6745e079a613f2fefa79a657.zip gdb-c65f94a07aee0c1c6745e079a613f2fefa79a657.tar.gz gdb-c65f94a07aee0c1c6745e079a613f2fefa79a657.tar.bz2 |
Re: objdump read_section_stabs
Also fix ubsan "applying zero offset to null pointer".
* objdump.c (print_section_stabs): Avoid ubsan warning.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/objdump.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c index 40ed688..d00eed0 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -4499,7 +4499,7 @@ print_section_stabs (bfd *abfd, bfd_byte *stabp, *stabs_end; stabp = stabs; - stabs_end = stabp + stab_size; + stabs_end = PTR_ADD (stabp, stab_size); printf (_("Contents of %s section:\n\n"), sanitize_string (stabsect_name)); printf ("Symnum n_type n_othr n_desc n_value n_strx String\n"); |