[cfe-commits] r99441 - /cfe/trunk/lib/Checker/CheckSecuritySyntaxOnly.cpp
Ted Kremenek
kremenek at apple.com
Wed Mar 24 15:39:45 PDT 2010
Author: kremenek
Date: Wed Mar 24 17:39:45 2010
New Revision: 99441
URL: http://llvm.org/viewvc/llvm-project?rev=99441&view=rev
Log:
Improve static analyzer diagnostic concerning the use of 'mktemp'
Modified:
cfe/trunk/lib/Checker/CheckSecuritySyntaxOnly.cpp
Modified: cfe/trunk/lib/Checker/CheckSecuritySyntaxOnly.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CheckSecuritySyntaxOnly.cpp?rev=99441&r1=99440&r2=99441&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CheckSecuritySyntaxOnly.cpp (original)
+++ cfe/trunk/lib/Checker/CheckSecuritySyntaxOnly.cpp Wed Mar 24 17:39:45 2010
@@ -328,17 +328,16 @@
// Verify that the argument is a 'char*'.
if (PT->getPointeeType().getUnqualifiedType() != BR.getContext().CharTy)
return;
-
+
// Issue a waring.
SourceRange R = CE->getCallee()->getSourceRange();
BR.EmitBasicReport("Potential insecure temporary file in call 'mktemp'",
"Security",
"Call to function 'mktemp' is insecure as it always "
- "creates or uses insecure temporary file",
+ "creates or uses insecure temporary file. Use 'mkstemp' instead",
CE->getLocStart(), &R, 1);
}
-
//===----------------------------------------------------------------------===//
// Check: Linear congruent random number generators should not be used
// Originally: <rdar://problem/63371000>
More information about the cfe-commits
mailing list