diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-09 02:28:12 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-09 02:28:12 +0000 |
commit | c24e9f3a5782096d0bdd9e8aa9f80955a3b60bbd (patch) | |
tree | 1848490e410ba027866b5929bf1feca584130f6a /lib/Analysis/CheckSizeofPointer.cpp | |
parent | 53012f447145bfd5e3a759f069a2bdf2b6705708 (diff) |
Add a test case for CWE-467, and simplify the wording of the warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CheckSizeofPointer.cpp')
-rw-r--r-- | lib/Analysis/CheckSizeofPointer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/CheckSizeofPointer.cpp b/lib/Analysis/CheckSizeofPointer.cpp index c61f6f570a..3cec5c9e98 100644 --- a/lib/Analysis/CheckSizeofPointer.cpp +++ b/lib/Analysis/CheckSizeofPointer.cpp @@ -47,7 +47,7 @@ void WalkAST::VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E) { SourceRange R = E->getArgumentExpr()->getSourceRange(); BR.EmitBasicReport("Potential unintended use of sizeof() on pointer type", "Logic", - "The code calls sizeof() on a malloced pointer type, which always returns the wordsize/8. This can produce an unexpected result if the programmer intended to determine how much memory has been allocated.", + "The code calls sizeof() on a pointer type. This can produce an unexpected result.", E->getLocStart(), &R, 1); } } |