Merging r6555 from branch releases/1.8 to trunk

- Fixing buffer ovverread in CXMeshFileLoader (sfan5 patch)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6556 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2023-10-03 15:21:39 +00:00
parent b6e9202272
commit 857c75f37d
2 changed files with 4 additions and 1 deletions

View File

@ -408,7 +408,8 @@ bool CXMeshFileLoader::readFileIntoMemory(io::IReadFile* file)
return false;
}
Buffer = new c8[size];
Buffer = new c8[size+1];
Buffer[size] = 0x0; // null-terminate (thx @ sfan5)
//! read all into memory
if (file->read(Buffer, size) != static_cast<size_t>(size))