mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
Fix ubsan signed integer overflow
IMO a fairly useless warning in this case, but technically correct. PR 18708 * i386-dis.c (get64): Avoid signed integer overflow.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2015-07-23 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 18708
|
||||||
|
* i386-dis.c (get64): Avoid signed integer overflow.
|
||||||
|
|
||||||
2015-07-22 Alexander Fomin <alexander.fomin@intel.com>
|
2015-07-22 Alexander Fomin <alexander.fomin@intel.com>
|
||||||
|
|
||||||
PR binutils/18631
|
PR binutils/18631
|
||||||
|
@ -15387,11 +15387,11 @@ get64 (void)
|
|||||||
a = *codep++ & 0xff;
|
a = *codep++ & 0xff;
|
||||||
a |= (*codep++ & 0xff) << 8;
|
a |= (*codep++ & 0xff) << 8;
|
||||||
a |= (*codep++ & 0xff) << 16;
|
a |= (*codep++ & 0xff) << 16;
|
||||||
a |= (*codep++ & 0xff) << 24;
|
a |= (*codep++ & 0xffu) << 24;
|
||||||
b = *codep++ & 0xff;
|
b = *codep++ & 0xff;
|
||||||
b |= (*codep++ & 0xff) << 8;
|
b |= (*codep++ & 0xff) << 8;
|
||||||
b |= (*codep++ & 0xff) << 16;
|
b |= (*codep++ & 0xff) << 16;
|
||||||
b |= (*codep++ & 0xff) << 24;
|
b |= (*codep++ & 0xffu) << 24;
|
||||||
x = a + ((bfd_vma) b << 32);
|
x = a + ((bfd_vma) b << 32);
|
||||||
#else
|
#else
|
||||||
abort ();
|
abort ();
|
||||||
|
Reference in New Issue
Block a user