1
0
Fork 0

DBG: fix a possible crash in disasmget

This commit is contained in:
Duncan Ogilvie 2018-09-13 12:54:39 +02:00
parent 09fe1e379d
commit da913f7cdc
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ void disasmget(Zydis & cp, unsigned char* buffer, duint addr, DISASM_INSTR* inst
return;
}
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;
if(cp.IsBranchType(Zydis::BTJmp | Zydis::BTLoop | Zydis::BTRet | Zydis::BTCall))
instr->type = instr_branch;