aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/CStringChecker.cpp
diff options
context:
space:
mode:
authorJordy Rose <jediknil@belkadan.com>2010-08-16 23:25:19 +0000
committerJordy Rose <jediknil@belkadan.com>2010-08-16 23:25:19 +0000
commit070f2f467cecacf5245deacd2c3a7c32402027c9 (patch)
tree0501d6afc92700a1e30c969f44d4f2f260125169 /lib/Checker/CStringChecker.cpp
parent349d38cef04ddf8938047c1b542a799aa82dfe84 (diff)
Allow the "size" of a buffer access check to be either signed or unsigned. Fixes PR7925.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111205 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/CStringChecker.cpp')
-rw-r--r--lib/Checker/CStringChecker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Checker/CStringChecker.cpp b/lib/Checker/CStringChecker.cpp
index 0c0ccd6877..583462a00b 100644
--- a/lib/Checker/CStringChecker.cpp
+++ b/lib/Checker/CStringChecker.cpp
@@ -248,7 +248,7 @@ const GRState *CStringChecker::CheckBufferAccess(CheckerContext &C,
SValuator &SV = VM.getSValuator();
ASTContext &Ctx = C.getASTContext();
- QualType SizeTy = Ctx.getSizeType();
+ QualType SizeTy = Size->getType();
QualType PtrTy = Ctx.getPointerType(Ctx.CharTy);
// Check that the first buffer is non-null.