Sync from SUSE:SLFO:Main assimp revision 3fe22917bb0c8d7a4d43bd27b2c9f060

This commit is contained in:
Adrian Schröter 2024-09-24 00:30:56 +02:00
parent 96adc87c7f
commit b4b779e5b5
7 changed files with 398 additions and 79 deletions

View File

@ -1,27 +0,0 @@
From a0628aa4b175b6764ac6ea481a5e65f91cd118fa Mon Sep 17 00:00:00 2001
From: Christophe Marin <christophe@krop.fr>
Date: Wed, 4 Oct 2023 16:23:17 +0200
Subject: [PATCH] Don't build the collada importer/exporter tests
---
test/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index afe487411..d8f044501 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -141,8 +141,8 @@ SET( IMPORTERS
unit/utBlendImportMaterials.cpp
unit/utBlenderWork.cpp
unit/utBVHImportExport.cpp
- unit/utColladaExport.cpp
- unit/utColladaImportExport.cpp
+ # unit/utColladaExport.cpp
+ # unit/utColladaImportExport.cpp
unit/utCSMImportExport.cpp
unit/utB3DImportExport.cpp
#unit/utM3DImportExport.cpp
--
2.42.0

View File

@ -1,24 +0,0 @@
From 614911bb3b1bfc3a1799ae2b3cca306270f3fb97 Mon Sep 17 00:00:00 2001
From: Kim Kulling <kim.kulling@googlemail.com>
Date: Wed, 3 Jul 2024 21:05:53 +0200
Subject: [PATCH] Fix out of bound access
---
code/AssetLib/Ply/PlyLoader.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/code/AssetLib/Ply/PlyLoader.cpp b/code/AssetLib/Ply/PlyLoader.cpp
index 3e92339fb4..0c2463f240 100644
--- a/code/AssetLib/Ply/PlyLoader.cpp
+++ b/code/AssetLib/Ply/PlyLoader.cpp
@@ -564,6 +564,10 @@ void PLYImporter::LoadFace(const PLY::Element *pcElement, const PLY::ElementInst
if (mGeneratedMesh->mFaces == nullptr) {
mGeneratedMesh->mNumFaces = pcElement->NumOccur;
mGeneratedMesh->mFaces = new aiFace[mGeneratedMesh->mNumFaces];
+ } else {
+ if (mGeneratedMesh->mNumFaces < pcElement->NumOccur) {
+ throw DeadlyImportError("Invalid .ply file: Too many faces");
+ }
}
if (!bIsTriStrip) {

View File

@ -2,7 +2,7 @@
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/assimp/assimp</param>
<param name="revision">v5.3.1</param>
<param name="revision">v5.4.3</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
<!-- non-OSI media -->

BIN
assimp-5.3.1.tar.xz (Stored with Git LFS)

Binary file not shown.

BIN
assimp-5.4.3.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,11 +1,351 @@
-------------------------------------------------------------------
Fri Aug 23 11:52:21 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
Tue Sep 10 07:32:23 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Add patch from upstream to fix a heap-based buffer overflow in
the PLY importer class (bsc#1228142, CVE-2024-40724):
* 0001-Fix-out-of-bound-access.patch
- Set memory and disk constraints for s390x to fix tests failing
to build due to out-of-memory errors.
- Update to 5.4.3
* Ply-Importer: Fix vulnerability
* Update ccpp.yml
* `build`: Add ccache support
* Update glTF2AssetWriter.inl
* Update PyAssimp structs with Skeleton & SkeletonBone members
* FBX: add metadata as properties
* Fix casting typo in D3MFExporter::writeBaseMaterials (color
channels < 1.0f were zeroed out)
* Fix to judge 'multi-configuration' correctly
* Fix potential memory leak in SceneCombiner for LWS/IRR/MD3
loader
* Fix copying private data when source pointer is NULL
* Bump softprops/action-gh-release from 1 to 2
* Bump actions/upload-artifact from 1 to 4
* Bump actions/download-artifact from 1 to 4
* fix GetShortFilename function
* Added more Maya materials
* Sparky kitty studios master
* Expose aiGetEmbeddedTexture to C-API
* Fix leak in loader
* Fix MSVC build error
* Revert variable name (fix broken build on android)
* Fixes possible out-of-bound read in findDegenerate
* Remove recursive include
* include Exceptional.h in 3DSExporter.cpp
* Use DRACO_GLTF_BITSTREAM
* Fix MSVC PDBs and permit them to be disabled if required
* Added AND condition in poly2tri dll_symbol.h
* fixing static build
* FBX exporter - handle multiple vertex color channels
* Update DefaultIOSystem.cpp
* Make coord transfor for hs1 files optional
* Return false instead of crash
* A fuzzed stride could cause the max count to become negative
and hence wrap around uint
* CalcTangents: zero vector is invalid for tangent/bitangent
* Mosfet80 updatedpoli2tri
* Fix a fuzz test heap buffer overflow in mdl material loader
* Introduce interpolation mode to vectro and quaternion keys
* Update Python structs with missing fields
* Introduce interpolation mode to vectro and quaternion keys
* Kimkulling/fix double precision tests
* [USD] Integrate "tinyusdz" project
* Update Readme.md
* Allow empty slots in mTextureCoords
* Fix compile warning
* Replace raw pointers by std::string
* Fix potential heapbuffer overflow in md5 parsing
* Fixes bsc#1230679, CVE-2024-45679.
-------------------------------------------------------------------
Thu Jul 11 15:28:24 UTC 2024 - Dirk Müller <dmueller@suse.com>
- fix check failure on s390x (bsc#1218474)
-------------------------------------------------------------------
Tue Jul 9 12:08:55 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Update to 5.4.2
* Fix building on Haiku
* Reduce memory consumption in JoinVerticesProcess::ProcessMesh()
significantly
* Fix: Add check for invalid input argument
* Replace an assert
* Extension of skinning data export to GLB/GLTF format
* Fix output floating-point values to fbx
* Update ImproveCacheLocality.cpp
* Update Readme.md
* Deep arsdk bone double free
* Fix Spelling error
* use size in order to be compatible with float and double
* Fix: Add missing transformation for normalized normals.
* Fix: Implicit Conversion Error
* Fix add checks for indices
* Update FBXBinaryTokenizer.cpp
* link to external minizip with full path
* utf8 header not found
* Rm unnecessary deg->radian conversion in FBX exporter
* Fix empty mesh handling
* Refactoring: Some cleanups
* Fix invalid read of uint from uvwsrc
* Remove double delete
* fix mesh-name error.
* COLLADA fixes for textures in C4D input
* Use the correct allocator for deleting objects in case of
duplicate animation Ids
* Fix container overflow in MMD parser
* Fix: PLY heap buffer overflow
* Fix: Check if index for mesh access is out of range
* Update FBXConverter.cpp
* FBX: Use correct time scaling
* Drop explicit inclusion of contrib/ headers
* Update Build.md
* Fix buffer overflow in FBX::Util::DecodeBase64()
* Readme.md: correct 2 errors in section headers
* Fix double free in Video::~Video()
* FBXMeshGeometry: solve issue #5116 using patch provided
* Fix target names not being imported on some gLTF2 models
* correct grammar/typographic errors in comments (8 files)
* KHR_materials_specular fixes
* Disable Hunter
* fixed several issues
* Fix leak
* Check validity of archive without parsing
* Fix integer overflow
* Add a test before generating the txture folder
* Build: Disable building zlib for non-windows
* null check.
* Bump actions/upload-artifact from 3 to 4
* fix: KHR_materials_pbrSpecularGlossiness/diffuseFactor convert
to pbrMetallicRoughness/baseColorFactor
* fix building errors for MinGW
* dynamic_cast error.
* Add missing IRR textures
* Update Dockerfile
* Fix handling of X3D IndexedLineSet nodes
* Improve acc file loading
* Readme.md: present hyperlinks in a more uniform style
* FBX Blendshape FullWeight: Vec<Float> -> FullWeight: Vec<Double>
* Fix for issues #5422, #3411, and #5443 -- DXF insert scaling
fix and colour fix
* Update StbCommon.h to stay up-to-date with stb_image.h.
* Introduce aiBuffer
* Add bounds checks to the parsing utilities.
* Fix crash in viewer
* Static code analysis fixes
* Kimkulling/fix bahavior of remove redundat mats issue 5438
* Fix X importer breakage introduced in commit f844c33
* Fileformats.md: clarify that import of .blend files is deprecated
* feat:1.add 3mf vertex color read 2.fix 3mf read texture bug
* More GLTF loading hardening
* Bump actions/cache from 3 to 4
* Update CMakeLists.txt
* Blendshape->Geometry in FBX Export
* Fix identity matrix check
* Fix PyAssimp under Python >= 3.12 and macOS library search support
* Add ISC LICENSE file
* ColladaParser: check values length
* Include defs in not cpp-section
* Add correct double zero check
* Add zlib-header to ZipArchiveIOSystem.h
* Add 2024 to copyright infos
* Append a new setting "AI_CONFIG_EXPORT_FBX_TRANSPARENCY_FACTOR_REFER_TO_OPACITY"
* Eliminate non-ascii comments in clipper
* Fix compilation for MSVC14.
* Add correction of fbx model rotation
* Delete tools/make directory
* Delete packaging/windows-mkzip directory
* Fix #5420 duplicate degrees to radians conversion in fbx importer
* Respect merge identical vertices in ObjExporter
* Fix utDefaultIOStream test under MinGW
* Fix typos
* Add initial macOS support to C4D importer
* Update hunter into CMakeLists.txt
* Fix: add missing import for AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON_DEFAULT
* updated json
* Cleanup: Fix review findings
* CMake: Allow linking draco statically if ASSIMP_BUILD_DRACO_STATIC is set.
* updated minizip to last version
* updated STBIMAGElib
* fix issue #5461 (segfault after removing redundant materials)
* Update ComputeUVMappingProcess.cpp
* add some ASSIMP_INSTALL checks
* Fix SplitByBoneCount typo that prevented node updates
* Q3DLoader: Fix possible material string overflow
* Reverts the changes introduced
* fix a collada import bug
* mention IQM loader in Fileformats.md
* Kimkulling/fix pyassimp compatibility
* fix ASE loader crash when *MATERIAL_COUNT or *NUMSUBMTLS is not specified
or is 0
* Add checks for invalid buffer and size
* Make sure for releases revision will be zero
* glTF2Importer: Support .vrm extension
* Prepare v5.4.1
* Remove deprecated c++11 warnings
* fix ci
* Fix integer overflow
* Assimp viewer fixes
* Optimize readability
* Temporary fix for #5557 GCC 13+ build issue -Warray-bounds
* Fix a bug that could cause assertion failure.
* Fix possible nullptr dereferencing.
* Update ObjFileParser.cpp
* Fix for #5592 Disabled maybe-uninitialized error for
AssetLib/Obj/ObjFileParser.cpp
* updated zip
* Postprocessing: Fix endless loop
* Build: Fix compilation for VS-2022 debug mode - warning
* Converted a size_t to mz_uint that was being treated as an error
* Add trim to xml string parsing
* Replace duplicated trim
* Move aiScene constructor
* Move revision.h and revision.h.in to include folder
* Update MDLMaterialLoader.cpp
* Create inno_setup
* clean HunterGate.cmake
* Draft: Update init of aiString
* Fix init aistring issue 5622 inpython module
* update dotnet example
* Make stepfile schema validation more robust.
* fix PLY binary export color from float to uchar
* Some FBXs do not have "Materials" information, which can cause
parsing errors
* Fix collada uv channels - temporary was stored and then updated.
* remove ASE parsing break
* FBX-Exporter: Fix nullptr dereferencing
* Fix FBX exporting incorrect bone order
* fixes potential memory leak on malformed obj file
* Update zip.c
* Fixes some uninit bool loads
* Fix names of enum values in docstring of aiProcess_FindDegenerates
* Fix: StackAllocator Undefined Reference fix
* Plx: Fix out of bound access (CVE-2024-40724, boo#1228142)
-------------------------------------------------------------------
Tue May 21 13:11:09 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Update to 5.4.1
* CMake: Allow linking draco statically if ASSIMP_BUILD_DRACO_STATIC is set.
* Deps: updated minizip to last version
* Deps: updated STBIMAGElib
* Fix issue #5461 (segfault after removing redundant materials)
* Update ComputeUVMappingProcess.cpp
* Add some ASSIMP_INSTALL checks
* Fix SplitByBoneCount typo that prevented node updates
* Q3DLoader: Fix possible material string overflow
* Reverts the changes introduced by commit ad766cb in February 2022
* Fix a collada import bug
* Mention IQM loader in Fileformats.md
* Fix ASE loader crash when *MATERIAL_COUNT or *NUMSUBMTLS is not specified
or is 0
* Add checks for invalid buffer and size
* Make sure for releases revision will be zero
* glTF2Importer: Support .vrm extension
-------------------------------------------------------------------
Thu Apr 11 11:40:44 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Update to 5.4.0
* Reduce memory consumption in JoinVerticesProcess::ProcessMesh()
* Fix: Add check for invalid input argument
* Replace an assert
* Extension of skinning data export to GLB/GLTF format
* Fix output floating-point values to fbx
* Update ImproveCacheLocality.cpp
* Deep arsdk bone double free
* Fix Spelling error
* use size to be compatible with float and double
* Fix: Add missing transformation for normalized normals.
* Fix: Implicit Conversion Error
* Fix add checks for indices
* Update FBXBinaryTokenizer.cpp
* link to external minizip with full path
* utf8 header not found
* Rm unnecessary deg->radian conversion in FBX exporter
* Fix empty mesh handling
* Refactoring: Some cleanups
* Fix invalid read of uint from uvwsrc
* Remove double delete
* fix the mesh-name error.
* COLLADA fixes for textures in C4D input
* Use the correct allocator for deleting objects in case of
duplicate animation Ids
* Fix container overflow in MMD parser
* Fix: PLY heap buffer overflow
* Fix: Check if index for mesh access is out of range
* Update FBXConverter.cpp
* FBX: Use correct time scaling
* Drop explicit inclusion of contrib/ headers
* Update Build.md
* Fix buffer overflow in FBX::Util::DecodeBase64()
* Readme.md: correct 2 errors in section headers
* Fix double free in Video::~Video()
* FBXMeshGeometry: solve issue #5116 using patch provided
* Fix target names not being imported on some gLTF2 models
* correct grammar/typographic errors in comments (8 files)
* KHR_materials_specular fixes
* Disable Hunter
* fixed several issues
* Fix leak
* Check the validity of the archive without parsing
* Fix integer overflow
* Add a test before generating the texture folder
* Build: Disable building zlib for non-windows
* null check.
* Bump actions/upload-artifact from 3 to 4
* fix: KHR_materials_pbrSpecularGlossiness/diffuseFactor convert
to pbrMetallicRoughness/baseColorFactor
* dynamic_cast error.
* Add missing IRR textures
* Fix handling of X3D IndexedLineSet nodes
* Improve acc file loading
* Readme.md: present hyperlinks in a more uniform style
* FBX Blendshape FullWeight: Vec<Float> -> FullWeight: Vec<Double>
* Fix for issues #5422, #3411, and #5443 -- DXF insert scaling fix
and colour fix
* Update StbCommon.h to stay up-to-date with stb_image.h.
* Introduce aiBuffer
* Add bounds checks to the parsing utilities.
* Fix crash in viewer
* Static code analysis fixes
* Kimkulling/fix behavior of remove redundant mats issue 5438
* Fix X importer breakage introduced in commit f844c33
* Fileformats.md: clarify that import of .blend files is deprecated
* feat:1.add 3mf vertex color read 2.fix 3mf read texture bug
* More GLTF loading hardening
* Bump actions/cache from 3 to 4
* Blendshape->Geometry in FBX Export
* Fix identity matrix check
* Fix PyAssimp under Python >= 3.12 and macOS library search support
* Add ISC LICENSE file
* ColladaParser: check values length
* Include defs in not cpp-section
* Add correct double zero check
* Add zlib-header to ZipArchiveIOSystem.h
* Add 2024 to copyright infos
* Append a new setting "AI_CONFIG_EXPORT_FBX_TRANSPARENCY_FACTOR_REFER_TO_OPACITY"
* Eliminate non-ascii comments in clipper
* Fix compilation for MSVC14.
* Add correction of fbx model rotation
* Delete tools/make directory
* Delete packaging/windows-mkzip directory
* Fix #5420 duplicate degrees to radians conversion in fbx importer
* Respect merge identical vertices in ObjExporter
* Fix utDefaultIOStream test under MinGW
* Fix typos
* Add initial macOS support to C4D importer
* Update hunter into CMakeLists.txt
* Fix: add a missing import for AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON_DEFAULT
* updated json
* Cleanup: Fix review findings
* Update CMakeLists.txt
- Drop patch, merged upstream:
* 0001-ColladaParser-check-values-length-5462.patch
-------------------------------------------------------------------
Mon Feb 12 23:13:07 UTC 2024 - Adam Mizerski <adam@mizerski.pl>
- Reenable the Collada parser.
- Removed patch 0001-Don-t-build-the-collada-importer-exporter-tests.patch
- Add patch (boo#1207377, CVE-2022-45748)
* 0001-ColladaParser-check-values-length-5462.patch
- Improved tests filtering
-------------------------------------------------------------------
Wed Oct 4 14:14:08 UTC 2023 - Christophe Marin <christophe@krop.fr>
@ -425,12 +765,12 @@ Thu Jun 16 22:16:07 UTC 2016 - jengelh@inai.de
Tue Sep 3 09:38:16 UTC 2013 - joop.boonen@opensuse.org
- Fixed the build problem with docdir
moved samples/ to doc
moved samples/ to doc
-------------------------------------------------------------------
Fri Feb 1 21:12:07 UTC 2013 - joop.boonen@opensuse.org
- Improved the spec file, changed the names and cleaned the spec file
- Improved the spec file, changed the names and cleaned the spec file
-------------------------------------------------------------------
Mon Jul 30 00:00:00 CEST 2012 - sergey.shambir.auto@gmail.c

View File

@ -1,7 +1,7 @@
#
# spec file for package assimp
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,18 +18,14 @@
%define sover 5
Name: assimp
Version: 5.3.1
Version: 5.4.3
Release: 0
Summary: Library to load and process 3D scenes from various data formats
License: BSD-3-Clause AND MIT
Group: Development/Libraries/C and C++
URL: https://www.assimp.org/
URL: https://github.com/assimp/assimp
Source0: %{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE
Patch0: 0001-Don-t-build-the-collada-importer-exporter-tests.patch
# PATCH-FIX-UPSTREAM 0001-Fix-out-of-bound-access.patch bsc#1228142 CVE-2024-40724 -- Fix heap-based buffer overflow in the PLY importer class
Patch1: 0001-Fix-out-of-bound-access.patch
BuildRequires: cmake
BuildRequires: cmake >= 3.22
BuildRequires: dos2unix
BuildRequires: gcc-c++
BuildRequires: irrlicht-devel
@ -75,12 +71,9 @@ engine-specific format for easy and fast every-day-loading.
%build
%cmake \
-DASSIMP_IGNORE_GIT_HASH=ON \
-DASSIMP_BUILD_ZLIB=OFF \
-DASSIMP_WARNINGS_AS_ERRORS=OFF \
-DASSIMP_BUILD_ASSIMP_TOOLS=ON \
-DASSIMP_BUILD_COLLADA_IMPORTER=OFF \
-DASSIMP_BUILD_COLLADA_EXPORTER=OFF
-DASSIMP_IGNORE_GIT_HASH=ON \
-DASSIMP_WARNINGS_AS_ERRORS=OFF \
-DASSIMP_BUILD_ASSIMP_TOOLS=ON
%cmake_build
@ -90,12 +83,49 @@ engine-specific format for easy and fast every-day-loading.
find %{buildroot} -type f -name "*.la" -delete -print
%check
# More tests fail on s390x with version 5.4.1, skip %%check
%ifnarch s390x
pushd build
# utIssues.OpacityBugWhenExporting_727 test fails
gtest_filter="-"
# utVersion.aiGetVersionRevisionTest passes with git builds only
gtest_filter="${gtest_filter}:utVersion.aiGetVersionRevisionTest"
# the models-nonbsd are not in the tarball, tests depending on it are also excluded
./bin/unit --gtest_filter="-utIssues.OpacityBugWhenExporting_727:utVersion.aiGetVersionRevisionTest:ut3DImportExport*:ut3DSImportExport*:utMD2Importer*:utMD5Importer*:utBlenderImporter*:utQ3BSPImportExport*:utXImporter.importDwarf:utDXFImporterExporter.importRifle:utPMXImporter.importTest"
gtest_filter="${gtest_filter}:ut3DImportExport.importMarRifle"
gtest_filter="${gtest_filter}:ut3DImportExport.importMarRifleA"
gtest_filter="${gtest_filter}:ut3DImportExport.importMarRifleD"
gtest_filter="${gtest_filter}:ut3DSImportExport.importCartWheel"
gtest_filter="${gtest_filter}:ut3DSImportExport.importGranate"
gtest_filter="${gtest_filter}:ut3DSImportExport.importJeep1"
gtest_filter="${gtest_filter}:ut3DSImportExport.importMarRifle"
gtest_filter="${gtest_filter}:ut3DSImportExport.importMp5Sil"
gtest_filter="${gtest_filter}:ut3DSImportExport.importPyramob"
gtest_filter="${gtest_filter}:utBlenderImporter.importBob"
gtest_filter="${gtest_filter}:utBlenderImporter.importFleurOptonl"
gtest_filter="${gtest_filter}:utDXFImporterExporter.importRifle"
gtest_filter="${gtest_filter}:utMD2Importer.importDolphin"
gtest_filter="${gtest_filter}:utMD2Importer.importFlag"
gtest_filter="${gtest_filter}:utMD2Importer.importHorse"
gtest_filter="${gtest_filter}:utMD5Importer.importBoarMan"
gtest_filter="${gtest_filter}:utMD5Importer.importBob"
gtest_filter="${gtest_filter}:utPMXImporter.importTest"
gtest_filter="${gtest_filter}:utQ3BSPImportExport.importerTest"
gtest_filter="${gtest_filter}:utXImporter.importDwarf"
%ifnarch x86_64
# tests fail, because they assume you can compare floats
# See https://github.com/assimp/assimp/issues/4438
gtest_filter="${gtest_filter}:AssimpAPITest_aiMatrix3x3.*"
gtest_filter="${gtest_filter}:AssimpAPITest_aiMatrix4x4.*"
gtest_filter="${gtest_filter}:AssimpAPITest_aiQuaternion.*"
gtest_filter="${gtest_filter}:AssimpAPITest_aiVector2D.*"
gtest_filter="${gtest_filter}:AssimpAPITest_aiVector3D.*"
%endif
./bin/unit --gtest_filter="${gtest_filter}"
popd
%endif
%ldconfig_scriptlets -n lib%{name}%{sover}