Checklist
Description
Analyzer message:
V579 The ZydisDecoderDecodeFull function receives the pointer and its size as arguments. It is possibly a error. Inspect the third argument. decoder.cpp 29
Instruction longer than 8 byte will be cut off. A highly probable error or very strange code that requires a comment\simplification.
void DecoderImpl::printInstruction(void* code, u64 address) {
ZydisDecodedInstruction instruction;
ZydisDecodedOperand operands[ZYDIS_MAX_OPERAND_COUNT_VISIBLE];
ZyanStatus status =
ZydisDecoderDecodeFull(&m_decoder, code, sizeof(code),
&instruction, operands);
if (!ZYAN_SUCCESS(status)) {
fmt::print("decode instruction failed at {}\n", fmt::ptr(code));
} else {
printInst(instruction, operands, address);
}
}
Link to an article with additional information: https://pvs-studio.com/en/blog/posts/cpp/1405/
Reason
Fixing potential bug and\or code quality.
Examples
No response
Checklist
Description
Analyzer message:
V579 The ZydisDecoderDecodeFull function receives the pointer and its size as arguments. It is possibly a error. Inspect the third argument. decoder.cpp 29
Instruction longer than 8 byte will be cut off. A highly probable error or very strange code that requires a comment\simplification.
Link to an article with additional information: https://pvs-studio.com/en/blog/posts/cpp/1405/
Reason
Fixing potential bug and\or code quality.
Examples
No response