Merge pull request #4646 from sashashura/patch-4

Fixes Heap-buffer-overflow in Assimp::ObjFileParser::getFace
pull/4645/head^2
Kim Kulling 2022-07-18 15:18:59 +02:00 committed by GitHub
commit 749fe898b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -458,7 +458,8 @@ void ObjFileParser::getFace(aiPrimitiveType type) {
iPos = 0;
} else {
//OBJ USES 1 Base ARRAYS!!!!
const int iVal(::atoi(&(*m_DataIt)));
std::string number(&(*m_DataIt), m_DataItEnd - m_DataIt);
const int iVal(::atoi(number.c_str()));
// increment iStep position based off of the sign and # of digits
int tmp = iVal;