From 1d8adaf668c2c983342b305b15e2a8a429f94753 Mon Sep 17 00:00:00 2001 From: Andrei Vlad LUTAS Date: Tue, 21 Jul 2020 16:22:59 +0300 Subject: [PATCH] Use the safe NdDecodeEx API instead of the NdDecode API in the public docs example. --- docs/source/index.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 66b5579..1cbcef2 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -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);