Fix Heap-buffer-overflow READ in Assimp::ObjFileParser::getFace
parent
bee751b5f9
commit
c3e69b5b82
|
@ -456,8 +456,8 @@ void ObjFileParser::getFace(aiPrimitiveType type) {
|
|||
iPos = 0;
|
||||
} else {
|
||||
//OBJ USES 1 Base ARRAYS!!!!
|
||||
const char *token = &(*m_DataIt);
|
||||
const int iVal = ::atoi(token);
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue