From 2fa80c7da5cad30c76dd1c6f2d8d83a6166ea581 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Tue, 22 Oct 2019 15:21:27 +0100 Subject: [PATCH] CPP: Fix qhelp. --- .../Buffer Overflow/NtohlArrayNoBoundOpenSource.qhelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/Likely Bugs/Memory Management/Buffer Overflow/NtohlArrayNoBoundOpenSource.qhelp b/cpp/ql/src/Likely Bugs/Memory Management/Buffer Overflow/NtohlArrayNoBoundOpenSource.qhelp index 49bfcd43b91..522d6cde74c 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/Buffer Overflow/NtohlArrayNoBoundOpenSource.qhelp +++ b/cpp/ql/src/Likely Bugs/Memory Management/Buffer Overflow/NtohlArrayNoBoundOpenSource.qhelp @@ -26,7 +26,7 @@ using the value as an array index or bound. -

In the example below, network data is retrieved and passed to ntohl

to convert +

In the example below, network data is retrieved and passed to ntohl to convert it to host byte order. The data is then used as an index in an array access expression. However, there is no validation that the data returned by ntohl is within the bounds of the array, which could lead to reading outside the bounds of the buffer.