diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-11-24 05:16:01 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-11-24 05:16:01 +0000 |
| commit | 4b89e034a7778669c4f0888d66afef4cc03fb064 (patch) | |
| tree | b0483981a700104fb17a89e125a26ad60e0f4bdb /lib/Analysis/RegionStore.cpp | |
| parent | f2e8d98f7a8a6afdef0e9631af01c8e6c53cdf0d (diff) | |
| download | clang-4b89e034a7778669c4f0888d66afef4cc03fb064.tar.gz clang-4b89e034a7778669c4f0888d66afef4cc03fb064.tar.bz2 clang-4b89e034a7778669c4f0888d66afef4cc03fb064.tar.xz | |
Strings are NULL terminated. So the region size should plus one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
| -rw-r--r-- | lib/Analysis/RegionStore.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 73b25955c1..99c225f5e8 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -275,7 +275,7 @@ SVal RegionStoreManager::getSizeInElements(const GRState* St, const StringLiteral* Str = SR->getStringLiteral(); // We intentionally made the size value signed because it participates in // operations with signed indices. - return NonLoc::MakeVal(getBasicVals(), Str->getByteLength(), false); + return NonLoc::MakeVal(getBasicVals(), Str->getByteLength() + 1, false); } if (const AnonTypedRegion* ATR = dyn_cast<AnonTypedRegion>(R)) { |
