diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-02-23 01:11:40 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-02-23 01:11:40 +0000 |
commit | 49c5ac575a2522667b1352aed9273a4e94ab8640 (patch) | |
tree | dc40a23092321108f3c3207ffab5a233509b609c /lib/Bitcode/Reader | |
parent | 2b026467da67da770418835be0793cee65e6196b (diff) | |
download | external_llvm-49c5ac575a2522667b1352aed9273a4e94ab8640.zip external_llvm-49c5ac575a2522667b1352aed9273a4e94ab8640.tar.gz external_llvm-49c5ac575a2522667b1352aed9273a4e94ab8640.tar.bz2 |
Fixed buffer overflow reported by Argiris Kirtzidis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader')
-rw-r--r-- | lib/Bitcode/Reader/Deserialize.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bitcode/Reader/Deserialize.cpp b/lib/Bitcode/Reader/Deserialize.cpp index 8455d0e..113321f 100644 --- a/lib/Bitcode/Reader/Deserialize.cpp +++ b/lib/Bitcode/Reader/Deserialize.cpp @@ -324,7 +324,7 @@ char* Deserializer::ReadCStr(char* cstr, unsigned MaxLen, bool isNullTerm) { cstr[i] = (char) ReadInt(); if (isNullTerm) - cstr[len+1] = '\0'; + cstr[len] = '\0'; return cstr; } |