This is
*cst = (data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3];
data is unsigned char which promotes to int.
* h8300-dis.c (extract_immediate): Avoid signed overflow.
(bfd_h8_disassemble): Likewise.
+2019-12-11 Alan Modra <amodra@gmail.com>
+
+ * h8300-dis.c (extract_immediate): Avoid signed overflow.
+ (bfd_h8_disassemble): Likewise.
+
2019-12-11 Alan Modra <amodra@gmail.com>
* d30v-dis.c (print_insn): Make opind unsigned. Don't access
break;
case L_32:
*len = 32;
- *cst = (data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3];
+ *cst = (((unsigned) data[0] << 24) + (data[1] << 16)
+ + (data[2] << 8) + data[3]);
break;
default:
*len = 0;
{
int i = len / 2;
- cst[opnr] = ((data[i] << 24)
+ cst[opnr] = (((unsigned) data[i] << 24)
| (data[i + 1] << 16)
| (data[i + 2] << 8)
| (data[i + 3]));