Fixed buffer overflow reported by Argiris Kirtzidis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47517 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2008-02-23 01:11:40 +00:00
parent 4d4a5e0bd2
commit 57daefa187

View File

@ -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;
}