diff options
author | Alan Modra <amodra@gmail.com> | 2020-09-02 10:05:52 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-09-02 16:30:42 +0930 |
commit | 839f41a323fe2ba58e64431bd567a214f776aa7c (patch) | |
tree | 7ac18b03d5b76d2298d15972de23f5ae16d598d4 /binutils/objdump.c | |
parent | 26009aa7639bb4103291bb79743dc4e51175f80a (diff) | |
download | gdb-839f41a323fe2ba58e64431bd567a214f776aa7c.zip gdb-839f41a323fe2ba58e64431bd567a214f776aa7c.tar.gz gdb-839f41a323fe2ba58e64431bd567a214f776aa7c.tar.bz2 |
ubsan: objdump.c:3009 negation of -2147483648
* objdump.c (disassemble_bytes): Use an unsigned type for "addend".
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r-- | binutils/objdump.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c index c7ad51e..91da480 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -3002,8 +3002,8 @@ disassemble_bytes (struct disassemble_info * inf, if (q->addend) { - bfd_signed_vma addend = q->addend; - if (addend < 0) + bfd_vma addend = q->addend; + if ((bfd_signed_vma) addend < 0) { printf ("-0x"); addend = -addend; |