mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
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:
parent
4d4a5e0bd2
commit
57daefa187
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user