The heap-use-after-free vulnerability occurs in the
CallbackToLogRedirector function. During the process of logging,
a previously freed memory region is accessed, leading to a
use-after-free condition. This vulnerability stems from incorrect
memory management, specifically, freeing a log stream and then
attempting to access it later on.
This patch sets NULL value for The DefaultStream global pointer.
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
If mesh is validated after AttributeBegin call, then
the AttributeBegin is never closed with an
AttributeEnd, causing problems in pbrt.
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
Previously it was possible that the number of vertices between the mesh and morph mesh varied.
This may have caused problems in tools like Blender, and this ensures there's a 1-1
correspondence between vertices.
In addition, exporting doubles broke meshlab on import, so now it exports floats.
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
Previously GLTF meshes were created even if there were no faces, which lead to GLTFs which were not technically valid.
I believe this fixes the problem I was encountering, but I've not been able to test it because of some Mac compile errors. Will test on a windows machine at some point.
Fixes#5868
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Add CI to automatically build and attach binaries to releases
* Correctly label arm64 MacOS and add x64 variation
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Fix potential uninitialized variable in clipper
* Clipper: Fix second parameter as well.
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Try to resolve image paths by replacing backslashes.
* Some changes suggested by CI
* Removed usage of <filesystem>.
* Removing usage of C++20/C++23 features
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
This resolves an issue where using GCC as your C compiler but, say, clang++ as your CXX compiler produces
`error: unknown warning option '-Wno-dangling-reference' [-Werror,-Wunknown-warning-option]`
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* +Add vertex duplication during face normal generation
`aiProcess_GenNormals` PostProcess now duplicates vertices if they are referenced by more than one polygon which results in the correct faceted appearance.
* Update GenFaceNormalsProcess.cpp
- Fix old spellings
- Use static_cast instead of c-style casts
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Update tinyusdz to latest git commit
* Update patch file
* Bump to latest tinyusdz version
* Remove unused var (fix broken build for clients treating warnings-as-errors)
---------
Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
- Experimental view to mak the current activity in the project more visible and transparent
- Will create a more easy to get view onto the base activities like issues, PR and contributors
In all other instances where we set mErrorString inside a catch block
we also set mException. I think that this was an oversight.
Co-authored-by: Michael Schmitt <michael.schmitt@visometry.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Use CMake options to control M3D source compilation
* Revert .cpp file changes (better to treat them as external 3rd party code)
* Improve documentation
---------
Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
* Add nascent tests against models broken by 5 Oct 2020 commit 3b9d4cf
* Temporarily disable chevy unit test (CI failing)
* Fix unit test assert value
* Swap actual/expected values and add correct value NE asserts
* Fix correct mesh count (indices 0-99 = 100 meshes)
---------
Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
* Convert integer values to floating point
* Add reference screenshot
* Restore assert to expect pass instead of fail
---------
Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
* Fix a bug in the assbin loader that reads uninitialized memory
* Address review comment
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
assigning s_pNullLogger to the parameter "logger" is definitely wrong.
However, custom logger previously set from user must not be deleted.
The user itself must handle allocation / deallocation.