Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b26a90e

Browse files
ihsinmeMathiasVP
andauthored
Update cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.ql
Co-authored-by: Mathias Vorreiter Pedersen <[email protected]>
1 parent 1c4610c commit b26a90e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/**
22
* @name Compiler Removal Of Code To Clear Buffers
3-
* @description --Using the memset function to clear private data as a final expression when working with a variable is potentially dangerous because the compiler can optimize this call.
4-
* --For some compilers, optimization is also possible when using calls to free memory after the memset function.
5-
* --To clear it, you need to use the RtlSecureZeroMemory or memset_s functions, or compilation flags that exclude optimization of memset calls (-fno-builtin-memset).
3+
* @description Using <code>memset</code> the function to clear private data in a variable that has no subsequent use
4+
* is potentially dangerous because the compiler can remove the call.
65
* @kind problem
76
* @id cpp/compiler-removal-of-code-to-clear-buffers
87
* @problem.severity warning

0 commit comments

Comments
 (0)