浏览代码

fix-CVE-2025-3158: closes #6023 Fixes CVE-2025-3158: Heap-based Buffer Overflow in Assimp::LWO::AnimResolver::UpdateAnimRangeSetup (#6222)

- changed loop-condition to reflect the fact that m must be smaller than n

Co-authored-by: Vinz Spring <[email protected]>
Co-authored-by: Kim Kulling <[email protected]>
Vinz Spring 3 月之前
父节点
当前提交
357b5baabb
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      code/AssetLib/LWO/LWOAnimation.cpp

+ 1 - 1
code/AssetLib/LWO/LWOAnimation.cpp

@@ -212,7 +212,7 @@ void AnimResolver::UpdateAnimRangeSetup() {
             unsigned int tt = 1;
             for (const double tmp = delta * (num + 1); cur_minus <= tmp; cur_minus += delta, ++tt) {
                 m = (delta == tmp ? (*it).keys.begin() : n - (old_size + 1));
-                for (; m != n; --n) {
+                for (; m < n; --n) {
                     (*n).time -= cur_minus;
 
                     // offset repeat? add delta offset to key value