fixed potential uninitialized variable access when decoding AVX/XOP/EVEX

This commit is contained in:
Stanislav Shwartsman 2016-07-06 09:09:49 +00:00
parent 6761495f7e
commit 88637aa9ef
2 changed files with 6 additions and 0 deletions

View File

@ -1768,6 +1768,7 @@ fetch_b1:
has_modrm = (opcode_byte != 0x177); // if not VZEROUPPER/VZEROALL opcode
OpcodeInfoPtr = &BxOpcodeTableAVX[(opcode_byte-256)*2 + vex_l];
attr = OpcodeInfoPtr->Attr;
}
#if BX_SUPPORT_EVEX
else if (b1 == 0x62 && (*iptr & 0xc0) == 0xc0) {
@ -1822,6 +1823,7 @@ fetch_b1:
has_modrm = 1;
OpcodeInfoPtr = &BxOpcodeTableEVEX[opcode_byte*2 + (opmask != 0)];
attr = OpcodeInfoPtr->Attr;
}
#endif
else if (b1 == 0x8f && (*iptr & 0xc8) == 0xc8) {
@ -1856,6 +1858,7 @@ fetch_b1:
opcode_byte += 256 * xop_opcext;
OpcodeInfoPtr = &BxOpcodeTableXOP[opcode_byte];
attr = OpcodeInfoPtr->Attr;
}
else
#endif

View File

@ -1975,6 +1975,7 @@ fetch_b1:
has_modrm = (opcode_byte != 0x177); // if not VZEROUPPER/VZEROALL opcode
OpcodeInfoPtr = &BxOpcodeTableAVX[(opcode_byte-256)*2 + vex_l];
attr = OpcodeInfoPtr->Attr;
}
#if BX_SUPPORT_EVEX
else if (b1 == 0x62) {
@ -2039,6 +2040,7 @@ fetch_b1:
has_modrm = 1;
OpcodeInfoPtr = &BxOpcodeTableEVEX[opcode_byte*2 + (opmask != 0)];
attr = OpcodeInfoPtr->Attr;
}
#endif
else if (b1 == 0x8f && (*iptr & 0x08) == 0x08) {
@ -2085,6 +2087,7 @@ fetch_b1:
opcode_byte += 256 * xop_opcext;
OpcodeInfoPtr = &BxOpcodeTableXOP[opcode_byte];
attr = OpcodeInfoPtr->Attr;
}
else
#endif