Skip to content

Commit

Permalink
Merge pull request assimp#5168 from sashashura/4879958521806848
Browse files Browse the repository at this point in the history
Fix UNKNOWN READ in Assimp::SMDImporter::ParseNodeInfo
  • Loading branch information
kimkulling committed Jul 3, 2023
2 parents d3ee157 + ed90354 commit 9a94b26
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/AssetLib/SMD/SMDLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,10 @@ void SMDImporter::ParseNodeInfo(const char* szCurrent, const char** szCurrentOut
unsigned int iBone = 0;
SkipSpacesAndLineEnd(szCurrent,&szCurrent);
if ( !ParseUnsignedInt(szCurrent,&szCurrent,iBone) || !SkipSpaces(szCurrent,&szCurrent)) {
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone index");
throw DeadlyImportError("Unexpected EOF/EOL while parsing bone index");
}
if (iBone == UINT_MAX) {
LogErrorNoThrow("Invalid bone number while parsing bone index");
SMDI_PARSE_RETURN;
}
// add our bone to the list
Expand Down

0 comments on commit 9a94b26

Please sign in to comment.