Minor decoder fixes

- Cosmetic changes
- Check `instruction` argument for `NULL`
This commit is contained in:
Joel Höner 2017-10-27 03:07:33 +02:00
parent 5ed561a0fc
commit 22318a04dd
1 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ typedef struct ZydisDecoderContext_
*/
uint8_t lastSegmentPrefix;
/**
* @brief Contains the prefix that should be traited as the mandatory-prefix, if the current
* @brief Contains the prefix that should be treated as the mandatory-prefix, if the current
* instruction needs one.
*
* The last 0xF3/0xF2 prefix has precedence over previous ones and 0xF3/0xF2 in
@ -4428,7 +4428,7 @@ ZydisStatus ZydisDecoderInitEx(ZydisDecoder* decoder, ZydisMachineMode machineMo
ZydisStatus ZydisDecoderDecodeBuffer(const ZydisDecoder* decoder, const void* buffer,
size_t bufferLen, uint64_t instructionPointer, ZydisDecodedInstruction* instruction)
{
if (!decoder)
if (!decoder || !instruction)
{
return ZYDIS_STATUS_INVALID_PARAMETER;
}