1
0
mirror of https://github.com/bitdefender/bddisasm.git synced 2024-11-18 05:28:09 +00:00

Use the safe NdDecodeEx API instead of the NdDecode API in the public docs example.

This commit is contained in:
Andrei Vlad LUTAS 2020-07-21 16:22:59 +03:00
parent 698ba367a1
commit 1d8adaf668

View File

@ -111,7 +111,7 @@ simple as calling one of the decoding API:
unsigned char ins[2] = { 0x33, 0xC0 };
NDSTATUS status;
status = NdDecode(&ix, ins, ND_CODE_64, ND_DATA_64);
status = NdDecodeEx(&ix, ins, sizeof(ins), ND_CODE_64, ND_DATA_64);
if (!ND_SUCCESS(status))
{
printf("Decoding failed with error 0x%08x!\n", status);
@ -139,7 +139,7 @@ has to be obtained by calling the **NdToText** API:
NDSTATUS status;
char txt[ND_MIN_BUF_SIZE];
status = NdDecode(&ix, ins, ND_CODE_64, ND_DATA_64);
status = NdDecodeEx(&ix, ins, sizeof(ins), ND_CODE_64, ND_DATA_64);
if (!ND_SUCCESS(status))
{
printf("Decoding failed with error 0x%08x!\n", status);
@ -210,7 +210,7 @@ Assuming we have already decoded an instruction as follows:
NDSTATUS status;
char txt[ND_MIN_BUF_SIZE];
status = NdDecode(&ix, ins, ND_CODE_64, ND_DATA_64);
status = NdDecodeEx(&ix, ins, sizeof(ins), ND_CODE_64, ND_DATA_64);
if (!ND_SUCCESS(status))
{
printf("Decoding failed with error 0x%08x!\n", status);