DBG: fix a possible crash in disasmget
This commit is contained in:
parent
09fe1e379d
commit
da913f7cdc
|
@ -207,7 +207,7 @@ void disasmget(Zydis & cp, unsigned char* buffer, duint addr, DISASM_INSTR* inst
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto cpInstr = cp.GetInstr();
|
auto cpInstr = cp.GetInstr();
|
||||||
strcpy_s(instr->instruction, cp.InstructionText().c_str());
|
strncpy_s(instr->instruction, cp.InstructionText().c_str(), _TRUNCATE);
|
||||||
instr->instr_size = cpInstr->length;
|
instr->instr_size = cpInstr->length;
|
||||||
if(cp.IsBranchType(Zydis::BTJmp | Zydis::BTLoop | Zydis::BTRet | Zydis::BTCall))
|
if(cp.IsBranchType(Zydis::BTJmp | Zydis::BTLoop | Zydis::BTRet | Zydis::BTCall))
|
||||||
instr->type = instr_branch;
|
instr->type = instr_branch;
|
||||||
|
|
Loading…
Reference in New Issue