FIX: Fix head overflow in MD5-parser.

This commit is contained in:
Kim Kulling
2022-09-20 21:03:58 +02:00
parent a165dbc6ff
commit f1766c4bd5
2 changed files with 88 additions and 105 deletions

View File

@@ -60,14 +60,10 @@ using namespace Assimp::MD5;
// ------------------------------------------------------------------------------------------------
// Parse the segment structure for an MD5 file
MD5Parser::MD5Parser(char *_buffer, unsigned int _fileSize) {
MD5Parser::MD5Parser(char *_buffer, unsigned int _fileSize) : buffer(_buffer), bufferEnd(_buffer + fileSize), fileSize(_fileSize), lineNumber(0) {
ai_assert(nullptr != _buffer);
ai_assert(0 != _fileSize);
buffer = _buffer;
fileSize = _fileSize;
lineNumber = 0;
ASSIMP_LOG_DEBUG("MD5Parser begin");
// parse the file header