aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-01-31 19:33:31 +0000
committerAnna Zaks <ganna@apple.com>2012-01-31 19:33:31 +0000
commitee5e8ae845a940d14746f91a4b5ea59e4a43d278 (patch)
tree7f204fe922153d7675670392057f2794c2fb87f8 /clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
parentebaefe7527d491fbf018ad2e76c614283281cbbe (diff)
downloadllvm-ee5e8ae845a940d14746f91a4b5ea59e4a43d278.zip
llvm-ee5e8ae845a940d14746f91a4b5ea59e4a43d278.tar.gz
llvm-ee5e8ae845a940d14746f91a4b5ea59e4a43d278.tar.bz2
[analyzer] Change the warning to suggest 'strlcat/strlcpy' as
replacements for 'starcat/strcpy' instead of 'strncat/strncpy'. llvm-svn: 149406
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
index 0798a29..87594ff 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
@@ -516,7 +516,7 @@ void WalkAST::checkCall_strcpy(const CallExpr *CE, const FunctionDecl *FD) {
"Call to function 'strcpy' is insecure as it does not "
"provide bounding of the memory buffer. Replace "
"unbounded copy functions with analogous functions that "
- "support length arguments such as 'strncpy'. CWE-119.",
+ "support length arguments such as 'strlcpy'. CWE-119.",
CELoc, &R, 1);
}
@@ -543,7 +543,7 @@ void WalkAST::checkCall_strcat(const CallExpr *CE, const FunctionDecl *FD) {
"Call to function 'strcat' is insecure as it does not "
"provide bounding of the memory buffer. Replace "
"unbounded copy functions with analogous functions that "
- "support length arguments such as 'strncat'. CWE-119.",
+ "support length arguments such as 'strlcat'. CWE-119.",
CELoc, &R, 1);
}