summaryrefslogtreecommitdiffstats
path: root/code
Commit message (Collapse)AuthorAgeFilesLines
* Fix linkage (#6388)Kim Kulling2025-11-1615-66/+40
| | | | * Fix linkage when all importers aren't part of the build.
* Reorganize code top prevent security warning. (#6395)Kim Kulling2025-11-152-95/+103
| | | | * Reorganize code to prevent security warning.
* Fix the doxygen documentation from public headers (#6394)Kim Kulling2025-11-141-13/+25
| | | | | * Add documentation comments to DeboneProcess.h
* Refactor string checks and variable declarations (#6392)Kim Kulling2025-11-141-4/+6
| | | | | | | * Refactor string checks and variable declarations * Change string check from contains to find * Fix syntax error in mesh node creation loop
* glTF2: Avoid lookups for generating IDs (#6120)Jerome St-Louis2025-11-137-38/+27
| | | | | | * glTF2: Reduce lookups for generating IDs - closes https://github.com/assimp/assimp/issues/5661
* Fix sonarcube stuff (#6387)Kim Kulling2025-11-106-12/+10
| | | | * Fix sonarcube stuff
* Refactor condition checks for empty vectors (#6385)Kim Kulling2025-11-0711-177/+157
| | | | * Refactor based on SonarCube.
* fix: write textures to folder of PBRT file (#6099)Jan Honsbrok2025-11-052-8/+17
| | | | * fix: write textures to folder of PBRT file
* Revert "Refactoring: use using types (#6266)" (#6324)Luca Della Vedova2025-11-0429-94/+97
| | | | | * Revert "Refactoring: use using types (#6266)"
* Fix Heap-buffer-overflow in Q3DImporter::InternReadFile (#6370)Jan Grulich2025-11-041-0/+7
| | | | | | | | | Checks if multiplying texture width and height would overflow before performing the operation. This avoids incorrect memory allocations and potential crashes with very large textures. Fixes #6358 Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Fix out-of-range access cause of aiProcess_GenNormals : array size ↵sSsA012025-11-011-12/+71
| | | | | | | | | | | | | | | inconsistency of members of mesh after process (#6332) * Fix aiProcess_GenNormals process: copy members of mesh corresponding with additional vertices * Fix aiProcess_GenNormals process: Refoctoring * refactoring: fix SonarQube Issue * Update GenFaceNormalsProcess.cpp: fix small findings --------- Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* MD5: Fix face index allocation in MD5Parser (#6380)Kim Kulling2025-10-241-2/+6
| | | | - Ensure face indices are properly allocated and resized. - closes https://github.com/assimp/assimp/issues/6379
* COB: fix validation for ascii header (#6376)Kim Kulling2025-10-233-58/+91
| | | | * COB: fix validation for ascii header
* Collada: Fix overflow in CopyVertex (#6374)Kim Kulling2025-10-192-4/+7
| | | | * Fix overflow in CopyVertex
* Update texture output format in AssxmlFileWriter (#6372)Kim Kulling2025-10-171-1/+5
| | | | * Update texture output format in AssxmlFileWriter
* Bugfix/fix sonarcube findings (#6369)Kim Kulling2025-10-1449-508/+468
| | | | | * Fix sonarcube findings. --------- Co-authored-by: Kim Kulling <kim.kulling@draeger.com>
* Update default material name handling (#6366)Kim Kulling2025-10-071-7/+4
| | | | * Replace strcpy by strncpy
* Change strcpy to strncpy for format hint safety (#6365)Kim Kulling2025-10-021-1/+1
|
* Fix an invalid offsetof warning-as-error (#6359)Sami Liedes2025-09-281-0/+7
| | | | | The code already disables the warning on clang. It's also caused on GCC in some circumstances (particularly when building with -D_GLIBCXX_DEBUG).
* Clone meshlab/tinyusdz repos in default location (#6239)Steve M2025-09-232-20/+13
| | | | | | | | | | * Leave FETCHCONTENT_BASE_DIR as default to avoid target platform generated build file conflicts * Attempt address sonarCloud complaint about generic-looking include file (bare "Parser.h") --------- Co-authored-by: tellypresence <info@tellypresence.com> Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Add BOM skip and fix mtl parsing (#6253)Paul Bauriegel2025-09-224-32/+151
| | | | | | | | | * Add BOM skip and fix mtl parsing * Remove old code * Fix #5635 * Add all attributes to ObjFileData --------- Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Restore merging of near-identical vertices for JoinIdenticalVertices (#6278)Matt Penny2025-09-211-1/+60
| | | | | | | * Restore merging of near-identical vertices for JoinIdenticalVertices --------- Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Added tangent handedness to glTF export (#6322)Luca Della Vedova2025-09-181-3/+16
| | | | * Added tangent handedness to glTF export
* fix large glb reading by providing a proper helper for reading size_t type ↵Vitaly Ovchinnikov2025-09-091-0/+15
| | | | | | (#6307) Co-authored-by: Vitaly Ovchinnikov <v@ovch.ru> Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Add null check for aiNode in AddNode method (#6348)Kim Kulling2025-09-091-3/+5
| | | | - Added null check for node in AddNode function. - closes https://github.com/assimp/assimp/issues/6347
* FBX: Fix offset calculation by adding cursor check (#6337)Kim Kulling2025-08-281-1/+3
| | | - closes https://github.com/assimp/assimp/issues/6336
* Fix endiannes issues regarding floats on s390x (#6276) (#6277)Pranav P2025-08-261-16/+60
| | | | | | | | | * Fix endiannes issues regarding floats on s390x (#6276) * Fix CI Warnings --------- Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Fixed a `heap-use-after-free` in `SortByPTypeProcess`. (#6326)Dongge Liu2025-08-211-0/+1
| | | | | The process incorrectly deleted original meshes from the scene when cleaning up after an error if those meshes had been added to its output list (outMeshes). The fix ensures proper ownership transfer by nullifying the original mesh pointer in the scene (pScene->mMeshes[i] = nullptr;) when the mesh is moved to outMeshes. This prevents the scene destructor from attempting to delete the mesh again later, while allowing the error cleanup path in SortByPTypeProcess to correctly delete all meshes it owns (both newly created and transferred originals). Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Fixed a heap-buffer-overflow in the Half-Life 1 MDL loader. (#6321)Dongge Liu2025-08-181-0/+6
| | | | | | The loader attempted to read the MDL header without verifying if the input buffer was large enough. Added a check in MDLImporter::InternReadFile_HL1 to ensure the buffer size is sufficient before proceeding with loading. Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Fix SEGV write in Assimp::SortByPTypeProcess::Execute (#6318)Kyungjoon Ko2025-08-101-1/+4
| | | | * Fix OOB Write in Assimp::SortByPTypeProcess::Execute
* Fix to fail in the function fast_atoreal_move when the flag ↵sSsA012025-07-2919-87/+87
| | | | | | | | | | | | | | | | | | | ASSIMP_DOUBLE_PRESICION is enabled (#6250) * Refix export fbx PolygonVertexIndex * Fix the function ColladaParser::ReadEffectColor when the flag ASSIMP_DOUBLE_PRESICION is enabled * Fix the static function ReadLight in ColladaParser when the flag ASSIMP_DOUBLE_PRESICION is enabled * Refactor of the call of the function fast_atoreal_move to the member of aiColor3D * Fix the call of the function fast_atoreal_move when the flag ASSIMP_DOUBLE_PRESICION is enabled and and refactor * Fix the call of the function fast_atoreal_move when the flag ASSIMP_DOUBLE_PRESICION is enabled --------- Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* AC: Support Double-Sided Faces (#6252)DIGITAL IMAGE DESIGN2025-07-291-4/+37
| | | | | | | | | | | | | | | * AC: Support Double-Sided Faces The AC format marks double-sided SURF elements with the 0x20 flag, which Assimp ignored. This commit adds support for double-sided faces. On encountering a double-sided face via the flag mentioned above, the front face is generated as usual but is then duplicated. The winding order of the duplicate is flipped to form a back face. Vertices are duplicated too so that back faces work correctly with normal vector generation and face smoothing. * Add test file * Simplify test case --------- Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Refactoring: use using types (#6266)Kim Kulling2025-07-2829-97/+94
| | | | | | | * Refactoring: use using types --------- Co-authored-by: Kim Kulling <kim.kulling@draeger.com>
* X3D: Fix invalid vector::back usage (#6283)Kim Kulling2025-07-251-4/+10
| | | | * X3D: Fix invalid vector::back usage
* Add windows clang to CI (#5537)Kim Kulling2025-07-161-6/+0
| | | | | | | | - Add windows clang build step - Closes https://github.com/assimp/assimp/issues/5519 Co-authored-by: Kim Kulling <kim.kulling@draeger.com> Co-authored-by: Kim Kulling <kullingk@LDED5178.corp.draeger.global>
* Refix export fbx PolygonVertexIndex (#6240)sSsA012025-06-271-3/+12
| | | Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* bugfix: Fixed the memory leak when texture transforming (#6236) (#6237)HandsomeXi2025-06-262-96/+62
| | | | | | | * bugfix: Fixed the memory leak when texture transforming (#6236) --------- Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Refactoring: Add nupptr-checks (#6241)Kim Kulling2025-06-261-10/+15
|
* Fix: export fbx wrong to_ktime in FBXExporter.cpp (#6105)NSG2025-06-171-1/+5
| | | Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Prepare 6.0.2 (#6231)v6.0.2Kim Kulling2025-06-082-6/+6
|
* Fix the function "aiGetMaterialColor" when the flag ASSIMP_DOUBLE_PRECISION ↵sSsA012025-06-081-91/+30
| | | | | is enabled. (#6090) Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* fix-CVE-2025-3158: closes #6023 Fixes CVE-2025-3158: Heap-based Buffer ↵Vinz Spring2025-06-081-1/+1
| | | | | | | | 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 <vinzs@amazon.de> Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Fixes CVE-2025-2750: out of bounds write by assigning to wrong array element ↵Vinz Spring2025-06-081-1/+9
| | | | | | | | | | | | | | | | | | | | | | count tracking (closes #6011) (#6225) description: - The current implementation has faulty reallocation logic when parsing a CSM file - Issue 1 - https://github.com/assimp/assimp/blob/4ad1d2aa3086517816716a50aa122342806736f9/code/AssetLib/CSM/CSMLoader.cpp#L205 - By assigning s->mNumPositionKeys = alloc*2 right before resizing the buffer, making s->mNumPositionKeys equivalent to the max number of aiVectorKey that can be stored in s->mPositionKeys - the code later attempts to get the next write location by doing: aiVectorKey* sub = s->mPositionKeys + s->mNumPositionKeys; - this points to the end of the array, not after the last element in the array - Issue 2 - https://github.com/assimp/assimp/blob/4ad1d2aa3086517816716a50aa122342806736f9/code/AssetLib/CSM/CSMLoader.cpp#L178-L184 - if the CSM file does not declare last frame data, then mPositionKeys will never be initialized fix: - we preserve s->mNumPositionKeys to still contain the actual number of aiVectorKeys and ensure that we will not write out of bounds - we initialize mPositionKeys with a default value and if we find last frame info, we just re-initialize it Co-authored-by: Vinz Spring <vinzs@amazon.de> Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Fixes CVE-2025-2757: Heap-based Buffer Overflow in ↵Vinz Spring2025-06-081-0/+4
| | | | | | | | | | | | | AI_MD5_PARSE_STRING_IN_QUOTATION (closes #6019) (#6223) description: - heap buffer overflow in AI_MD5_PARSE_STRING_IN_QUOTATION. An attacker could potentially exploit the vulnerability to cause a remote code execution, if they can trick the victim into running assimp on a malformed MD5 file fix: - truncated the string to the maximum supported length, mitigating overflow Co-authored-by: Vinz Spring <vinzs@amazon.de> Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Fixes CVE-2025-2751: Out-of-bounds Read in ↵Vinz Spring2025-06-081-1/+7
| | | | | | | | | | | | | | | | Assimp::CSMImporter::InternReadFile (closes #6012) (#6224) description: issue: - https://github.com/assimp/assimp/blob/4ad1d2aa3086517816716a50aa122342806736f9/code/AssetLib/CSM/CSMLoader.cpp#L274C1-L275C1 - sometimes the code tried to construct a new 4x4 matrix from a nullptr, thus reading out of bounds fix: - added nullptr check - added array count check - added default fallback init to identity matrix Co-authored-by: Vinz Spring <vinzs@amazon.de> Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Update/update pugi xml (#6229)Kim Kulling2025-06-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update pugixml Improvements: Many xml_attribute:: and xml_node:: functions now transparently support std::string_view and std::string when C++17 support is detected. CMake improvements: Improve pkg-config file generation for NixOS PUGIXML_BUILD_APPLE_FRAMEWORK CMake option can be used to build pugixml as .xcframework PUGIXML_INSTALL CMake option can be used to disable installation targets Compatibility improvements: Fix clang/gcc warnings -Wzero-as-null-pointer-constant, -Wuseless-cast, -Wshorten-64-to-32 Fix unreferenced function warnings in PUGIXML_NO_STL configuration Fix CMake 3.31 deprecation warnings Stop using deprecated throw() when noexcept is available Improvements: xml_attribute::set_name and xml_node::set_name now have overloads that accept pointer to non-null-terminated string and size Implement parse_merge_pcdata parsing mode in which PCDATA contents is merged into a single node when original document had comments that were skipped during parsing xml_document::load_file now returns a more consistent error status when given a path to a folder Bug fixes: Fix assertion in XPath number→string conversion when using non-English locales Fix PUGIXML_STATIC_CRT CMake option to correctly select static CRT when using MSVC and recent CMake Compatibility improvements: Fix GCC 2.95/3.3 builds Fix CMake 3.27 deprecation warnings Fix XCode 14 sprintf deprecation warning when compiling in C++03 mode Fix clang/gcc warnings -Wweak-vtables, -Wreserved-macro-identifier * Update CMakeLists.txt * pugixml: upgrade to v1.15 * pugixml: Add export directives for non-windows platforms * pugixml: replace NULL by nullptr. --------- Co-authored-by: Andrea <realeandrea@yahoo.it> Co-authored-by: mosfet80 <10235105+mosfet80@users.noreply.github.com>
* Updated Inner Cone formula for Spot Lights in GLTF (#6078)Jackson Levitt2025-06-051-1/+1
| | | | | Updated the Inner Cone formula such that exponent values of 0 result in no inner cone and large exponent values result in a inner cone being most of the cone angle-wise. Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* fix compile error caused by PR #6087 when ASSIMP_DOUBLE_PRESICION is enabled ↵sSsA012025-06-051-1/+1
| | | | | (#6091) Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Fix export fbx: Wrong Materials in LayerElementMaterial if a node contains ↵sSsA012025-06-051-7/+6
| | | | | | | | | | | multi meshes (#6103) * fix export fbx wrong Materials index in LayerElementMaterial * Refix export fbx wrong Materials index in LayerElementMaterial. Materials index should be the order of Materials in connections of the Model node. --------- Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Fix: Add "preservePivots" condition when importing FBX animation (#6115)v6.0.0NSG2025-05-311-1/+1
| | | Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>