From 9a15ca10078416d1994cf933e72bcb62f6fdc836 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 7 Feb 2022 09:08:23 +0100 Subject: [PATCH 1/2] LWO: validate enum value before parsing it - Check for valid enum values - closes https://github.com/assimp/assimp/issues/4236 --- code/AssetLib/LWO/LWOAnimation.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/AssetLib/LWO/LWOAnimation.cpp b/code/AssetLib/LWO/LWOAnimation.cpp index 49fa45746..c2ee2d9c0 100644 --- a/code/AssetLib/LWO/LWOAnimation.cpp +++ b/code/AssetLib/LWO/LWOAnimation.cpp @@ -83,9 +83,13 @@ AnimResolver::AnimResolver(std::list &_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; From 836d12b9af78327bfd30b670971dccaa92932ccc Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 7 Feb 2022 09:23:59 +0100 Subject: [PATCH 2/2] Update ccpp.yml - Temporary disable hunter for windows - closes https://github.com/assimp/assimp/issues/4377 --- .github/workflows/ccpp.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 510ae8e7f..cef3fd4c7 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -13,7 +13,8 @@ jobs: strategy: fail-fast: false matrix: - name: [ubuntu-latest-g++, macos-latest-clang++, windows-latest-cl.exe, ubuntu-latest-clang++, ubuntu-gcc-hunter, macos-clang-hunter, windows-msvc-hunter] + #name: [ubuntu-latest-g++, macos-latest-clang++, windows-latest-cl.exe, ubuntu-latest-clang++, ubuntu-gcc-hunter, macos-clang-hunter, windows-msvc-hunter] + name: [ubuntu-latest-g++, macos-latest-clang++, windows-latest-cl.exe, ubuntu-latest-clang++, ubuntu-gcc-hunter, macos-clang-hunter] # For Windows msvc, for Linux and macOS let's use the clang compiler, use gcc for Linux. include: - name: windows-latest-cl.exe @@ -38,9 +39,9 @@ jobs: - name: macos-clang-hunter os: macos-latest toolchain: ninja-clang-cxx17-fpic - - name: windows-msvc-hunter - os: windows-latest - toolchain: ninja-vs-win64-cxx17 + #- name: windows-msvc-hunter + # os: windows-latest + # toolchain: ninja-vs-win64-cxx17 steps: - uses: actions/checkout@v2