Merge pull request #4376 from assimp/kimkulling-lwo-enum-validation_issue4236-1

LWO: validate enum value before parsing it
pull/4375/head^2 v5.2.1
Kim Kulling 2022-02-07 10:02:13 +01:00 committed by GitHub
commit ed8612ea35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -83,9 +83,13 @@ AnimResolver::AnimResolver(std::list<Envelope> &_envelopes, double tick) :
(*it).old_first = 0;
(*it).old_last = (*it).keys.size() - 1;
if ((*it).keys.empty()) continue;
if ((*it).keys.empty()) {
continue;
}
if ((int)(*it).type < 1 || (int)(*it).type>EnvelopeType_Unknown) {
continue;
}
switch ((*it).type) {
// translation
case LWO::EnvelopeType_Position_X:
trans_x = &*it;