Skip to content

Commit 6df4c89

Browse files
authored
Rewrite recommendations
- Replace segmentation fault with crash that is platform agnostic (I think segmentation fault is not really a thing on Windows). - Replace security vulnerability with malicious code execution. This provides a range of issues, because a crash (previously segmentation fault) could also be considered a security vulnerability. Namely a DOS. - Removed the additional note on stack allocated arrays which seem confusing because we are always talking about buffers allocated on the heap.
1 parent 5fa1b57 commit 6df4c89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/ql/src/Security/CWE/CWE-131/NoSpaceForZeroTerminator.qhelp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ the required buffer size, but do not allocate space for the zero terminator.
1212
</overview>
1313
<recommendation>
1414
<p>
15-
The expression highlighted by this rule creates a buffer that is of insufficient size to contain
16-
the data being copied. This makes the code vulnerable to buffer overflow which can result in anything from a segmentation fault to a security vulnerability (particularly if the array is on stack-allocated memory).
15+
The highlighted code segment creates a buffer without ensuring it's large enough to accommodate the copied data.
16+
This leaves the code susceptible to a buffer overflow attack, which could lead to anything from program crashes to malicious code execution.
1717
</p>
1818

1919
<p>

0 commit comments

Comments
 (0)