Skip to content

Commit 4be72c1

Browse files
Guru Das Srinageshmasahir0y
authored andcommitted
scripts/clang-tools: Remove DeprecatedOrUnsafeBufferHandling check
This `clang-analyzer` check flags the use of memset(), suggesting a more secure version of the API, such as memset_s(), which does not exist in the kernel: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Signed-off-by: Guru Das Srinagesh <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 1131475 commit 4be72c1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/clang-tools/run-clang-tools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def run_analysis(entry):
5151
checks += "linuxkernel-*"
5252
else:
5353
checks += "clang-analyzer-*"
54+
checks += ",-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling"
5455
p = subprocess.run(["clang-tidy", "-p", args.path, checks, entry["file"]],
5556
stdout=subprocess.PIPE,
5657
stderr=subprocess.STDOUT,

0 commit comments

Comments
 (0)