Fix null check when generating signature. (#562)
This commit is contained in:
parent
3e201dd521
commit
ec9af8feb6
@ -44,15 +44,22 @@ static main()
|
|||||||
// isTail(GetFlags(pAddress)) == Operand
|
// isTail(GetFlags(pAddress)) == Operand
|
||||||
// ((GetFlags(pAddress) & MS_CODE) == FF_IMMD) == :iiam:
|
// ((GetFlags(pAddress) & MS_CODE) == FF_IMMD) == :iiam:
|
||||||
|
|
||||||
if (pInfo.n == 1 && (pInfo.Op0.type == o_near || pInfo.Op0.type == o_far)) {
|
auto bDone = 0;
|
||||||
if (Byte(pAddress) == 0x0F) { // Two-byte instruction
|
|
||||||
sig = sig + sprintf("0F %02X ", Byte(pAddress + 1)) + PrintWildcards(GetDTSize(pInfo.Op0.dtyp));
|
if (pInfo.n == 1) {
|
||||||
} else {
|
if (pInfo.Op0.type == o_near || pInfo.Op0.type == o_far) {
|
||||||
sig = sig + sprintf("%02X ", Byte(pAddress)) + PrintWildcards(GetDTSize(pInfo.Op0.dtyp));
|
if (Byte(pAddress) == 0x0F) { // Two-byte instruction
|
||||||
|
sig = sig + sprintf("0F %02X ", Byte(pAddress + 1)) + PrintWildcards(GetDTSize(pInfo.Op0.dtyp));
|
||||||
|
} else {
|
||||||
|
sig = sig + sprintf("%02X ", Byte(pAddress)) + PrintWildcards(GetDTSize(pInfo.Op0.dtyp));
|
||||||
|
}
|
||||||
|
bDone = 1;
|
||||||
}
|
}
|
||||||
} else { // unknown, just wildcard addresses
|
}
|
||||||
auto i = 0;
|
|
||||||
for (i = 0; i < pInfo.size; i++) {
|
if (!bDone) { // unknown, just wildcard addresses
|
||||||
|
auto i = 0, itemSize = ItemSize(pAddress);
|
||||||
|
for (i = 0; i < itemSize; i++) {
|
||||||
auto pLoc = pAddress + i;
|
auto pLoc = pAddress + i;
|
||||||
if (GetFixupTgtType(pLoc) == FIXUP_OFF32) {
|
if (GetFixupTgtType(pLoc) == FIXUP_OFF32) {
|
||||||
sig = sig + PrintWildcards(4);
|
sig = sig + PrintWildcards(4);
|
||||||
|
Loading…
Reference in New Issue
Block a user