Fix OOB access in z80 disasm for "OP [ixy+nn]" instructions. (#17268)

This commit is contained in:
karliss 2020-07-14 11:58:16 +03:00 committed by GitHub
parent 1953f6808b
commit 35e824bc55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -112,7 +112,7 @@ FUNC_ATTR_USED static int z80Disass (RAsmOp *op, const ut8 *buf, int len) {
buf_asm = sdb_fmt (z_op[res].name, buf[2]+(buf[3]<<8));
}
if (z_op[res].type == (Z80_OP16^Z80_ARG8)) {
buf_asm = sdb_fmt (z_op[res].name, buf[2], buf[3]);
buf_asm = sdb_fmt (z_op[res].name, buf[2]);
}
if (z_op[res].type == (Z80_OP24 ^ Z80_ARG8)) {
cb_tab = (char **) z_op[res].op_moar;

View File

@ -1123,6 +1123,7 @@ d "xor 0x00" ee00
d "xor [hl]" ae
d "xor [ix+0x00]" ddae00
d "xor [iy+0x00]" fdae00
d "xor [iy+0x1f]" fdae1f
d "xor a" af
d "xor b" a8
d "xor c" a9