Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package alembic for openSUSE:Factory checked in at 2022-12-04 14:58:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/alembic (Old) and /work/SRC/openSUSE:Factory/.alembic.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "alembic" Sun Dec 4 14:58:35 2022 rev:11 rq:1039874 version:1.8.4 Changes: -------- --- /work/SRC/openSUSE:Factory/alembic/alembic.changes 2022-06-27 11:25:34.830592335 +0200 +++ /work/SRC/openSUSE:Factory/.alembic.new.1835/alembic.changes 2022-12-04 14:59:03.684514673 +0100 @@ -1,0 +2,23 @@ +Sat Dec 3 19:11:10 UTC 2022 - Dirk Müller <dmuel...@suse.com> + +- update to 1.8.4: + * Add ALEMBIC_DEBUG_WARNINGS_AS_ERRORS to control the build in debug mode. + * It is set to ON by default to preserve the current behavior. + * Use add_compile_options instead of the older add_definitions. (PR371) + * Fix the include dirs for AbcCoreHDF5 tests. (PR382) + * Fix issue hinted at in Issue 223: use PROJECT_SOURCE_DIR instead of + * CMAKE_SOURCE_DIR when embedding Alembic within another CMake project. (PR393) + * On Windows _BitScanForward64 is only available when _WIN64 is defined. + * When it is not, fall back on using _BitScanForward. (PR 373) + * Fuzzer issue 49213 turned up some new malformed MetaData memory problems. + * Indexed MetaData on the write side only allows 254 (plus the default empty one) + * small (up to 256 bytes), we now throw if we encounter malformed MetaData. + * We were also allowing empty property and object names through on the read side + * even though the writer forbids this. + * Finally integrate a couple of tests flagged by Taotao Gu's local fuzzer. + * (PR391 and PR397) + * Fuzzer issue 52939 showed that with certain malformed MetaData the pair + * separator should NOT occur before the assign separator. (PR396) + * N2f and N2d properties were not being correctly bound.(PR390) + +------------------------------------------------------------------- Old: ---- alembic-1.8.3.tar.gz New: ---- alembic-1.8.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ alembic.spec ++++++ --- /var/tmp/diff_new_pack.bTNYQO/_old 2022-12-04 14:59:04.156517393 +0100 +++ /var/tmp/diff_new_pack.bTNYQO/_new 2022-12-04 14:59:04.160517416 +0100 @@ -19,7 +19,7 @@ %define libname libAlembic1_8 Name: alembic -Version: 1.8.3 +Version: 1.8.4 Release: 0 Summary: Computer graphics interchange framework License: BSD-3-Clause ++++++ alembic-1.8.3.tar.gz -> alembic-1.8.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/CMakeLists.txt new/alembic-1.8.4/CMakeLists.txt --- old/alembic-1.8.3/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -35,7 +35,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.13) -PROJECT(Alembic VERSION 1.8.3) +PROJECT(Alembic VERSION 1.8.4) MESSAGE(STATUS "CMAKE SYSTEM NAME: ${CMAKE_SYSTEM_NAME}") @@ -65,6 +65,7 @@ OPTION(ALEMBIC_BUILD_LIBS "Build library, if off use external alembic libs" ON) OPTION(ALEMBIC_ILMBASE_LINK_STATIC "IlmBase is a static library" OFF) OPTION(ALEMBIC_SHARED_LIBS "Build shared libraries" ON) +OPTION(ALEMBIC_DEBUG_WARNINGS_AS_ERRORS "In debug mode build with warnings as errors" ON) SET(PYALEMBIC_PYTHON_MAJOR 3 CACHE STRING "Which major version of python to look for when building PyAlembic") option(DOCS_PATH @@ -126,11 +127,11 @@ ENDIF() # Set some debug vs opt flags -if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND NOT MSVC) - add_definitions(-Wall -Werror -Wextra -Wno-unused-parameter -Wno-deprecated) +if (ALEMBIC_DEBUG_WARNINGS_AS_ERRORS AND "${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND NOT MSVC) + add_compile_options(-Wall -Werror -Wextra -Wno-unused-parameter -Wno-deprecated) if((CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0) OR CMAKE_CXX_COMPILER_ID MATCHES "CLANG") - add_definitions( -Wno-error=implicit-fallthrough) + add_compile_options( -Wno-error=implicit-fallthrough) endif() endif() @@ -228,7 +229,7 @@ # Alembic IF (ALEMBIC_BUILD_LIBS) ADD_SUBDIRECTORY(lib) - INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/lib" "${PROJECT_BINARY_DIR}/lib") + INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/lib" "${PROJECT_BINARY_DIR}/lib") ADD_LIBRARY( Alembic::Alembic ALIAS Alembic ) ELSE() FIND_PACKAGE(Alembic REQUIRED CONFIG HINTS ${ALEMBIC_ROOT}) @@ -299,12 +300,12 @@ #-****************************************************************************** -SET(_config_msg "\n * Alembic Configuration ===") +SET(_config_msg "\n * Alembic Configuration ===") MACRO(info_cfg_option _setting) SET(_msg " * ${_setting}") STRING(LENGTH "${_msg}" _len) - WHILE("36" GREATER "${_len}") + WHILE("40" GREATER "${_len}") SET(_msg "${_msg} ") MATH(EXPR _len "${_len} + 1") ENDWHILE() @@ -323,6 +324,7 @@ info_cfg_option(USE_TESTS) info_cfg_option(ALEMBIC_ILMBASE_LINK_STATIC) info_cfg_option(ALEMBIC_SHARED_LIBS) +info_cfg_option(ALEMBIC_DEBUG_WARNINGS_AS_ERRORS) info_cfg_option(PYALEMBIC_PYTHON_MAJOR) info_cfg_option(DOCS_PATH) MESSAGE("${_config_msg}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/NEWS.txt new/alembic-1.8.4/NEWS.txt --- old/alembic-1.8.3/NEWS.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/NEWS.txt 2022-11-12 04:51:47.000000000 +0100 @@ -1,3 +1,39 @@ +2022-11-11, Alembic 1.8.4 + +Thanks to your feedback pull requests and submitted issues we +have a few bug fixes and build enhancements. + +CMake: + +Add ALEMBIC_DEBUG_WARNINGS_AS_ERRORS to control the build in debug mode. +It is set to ON by default to preserve the current behavior. +Use add_compile_options instead of the older add_definitions. (PR371) + +Fix the include dirs for AbcCoreHDF5 tests. (PR382) + +Fix issue hinted at in Issue 223: use PROJECT_SOURCE_DIR instead of +CMAKE_SOURCE_DIR when embedding Alembic within another CMake project. (PR393) + +AbcCoreOgawa: + +On Windows _BitScanForward64 is only available when _WIN64 is defined. +When it is not, fall back on using _BitScanForward. (PR 373) + +Fuzzer issue 49213 turned up some new malformed MetaData memory problems. +Indexed MetaData on the write side only allows 254 (plus the default empty one) +small (up to 256 bytes), we now throw if we encounter malformed MetaData. +We were also allowing empty property and object names through on the read side +even though the writer forbids this. +Finally integrate a couple of tests flagged by Taotao Gu's local fuzzer. +(PR391 and PR397) + +Fuzzer issue 52939 showed that with certain malformed MetaData the pair +separator should NOT occur before the assign separator. (PR396) + +PyAlembic: + +N2f and N2d properties were not being correctly bound.(PR390) + 2021-09-11, Alembic 1.8.3 Thanks to your feedback and submitted issues we have a few bug fixes. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/examples/AbcClients/CMakeLists.txt new/alembic-1.8.4/examples/AbcClients/CMakeLists.txt --- old/alembic-1.8.3/examples/AbcClients/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/examples/AbcClients/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -34,6 +34,6 @@ ## ##-***************************************************************************** -INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/examples") +INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/examples") ADD_SUBDIRECTORY(WFObjConvert) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/examples/CMakeLists.txt new/alembic-1.8.4/examples/CMakeLists.txt --- old/alembic-1.8.3/examples/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/examples/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -34,7 +34,7 @@ ##-***************************************************************************** # Recurse into libs -INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/lib") +INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/lib") # No boost dependency was needed so dont include AbcClients IF (USE_PYALEMBIC) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/Abc/Tests/CMakeLists.txt new/alembic-1.8.4/lib/Alembic/Abc/Tests/CMakeLists.txt --- old/alembic-1.8.3/lib/Alembic/Abc/Tests/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/Abc/Tests/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -33,7 +33,7 @@ ## ##-***************************************************************************** -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) ADD_EXECUTABLE(Abc_Test1 test1.cpp) TARGET_LINK_LIBRARIES(Abc_Test1 Alembic) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/Abc/Tests/ObjectTests.cpp new/alembic-1.8.4/lib/Alembic/Abc/Tests/ObjectTests.cpp --- old/alembic-1.8.3/lib/Alembic/Abc/Tests/ObjectTests.cpp 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/Abc/Tests/ObjectTests.cpp 2022-11-12 04:51:47.000000000 +0100 @@ -344,41 +344,7 @@ { AbcF::IFactory factory; IArchive archive = factory.getArchive("fuzzer_issue26643.abc"); - ABCA_ASSERT(archive.getTop().getNumChildren() == 3, - "Expected 3 children"); - - try - { - archive.getTop().getChild(0); - } - catch(const std::exception& e) - { - std::string msg = "IObject::getChild()\nERROR: EXCEPTION:\nOgawa IStreams::read failed."; - TESTING_ASSERT(msg == e.what()); - } - - try - { - archive.getTop().getChild(1); - } - catch(const std::exception& e) - { - std::string msg = "IObject::getChild()\nERROR: EXCEPTION:\nInvalid object data group"; - TESTING_ASSERT(msg == e.what()); - } - - try - { - archive.getTop().getChild(2); - } - catch(const std::exception& e) - { - std::string msg = "IObject::getChild()\nERROR: EXCEPTION:\nInvalid object data group"; - TESTING_ASSERT(msg == e.what()); - return; - } - - TESTING_ASSERT(0); + ABCA_ASSERT(!archive.valid(), "Should not be valid"); } int main( int argc, char *argv[] ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/AbcCollection/Tests/CMakeLists.txt new/alembic-1.8.4/lib/Alembic/AbcCollection/Tests/CMakeLists.txt --- old/alembic-1.8.3/lib/Alembic/AbcCollection/Tests/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/AbcCollection/Tests/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -33,7 +33,7 @@ ## ##-***************************************************************************** -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) ADD_EXECUTABLE(AbcCollection_CollectionTest CollectionTest.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/AbcCoreAbstract/Tests/CMakeLists.txt new/alembic-1.8.4/lib/Alembic/AbcCoreAbstract/Tests/CMakeLists.txt --- old/alembic-1.8.3/lib/Alembic/AbcCoreAbstract/Tests/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/AbcCoreAbstract/Tests/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -33,7 +33,7 @@ ## ##-***************************************************************************** -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) ADD_EXECUTABLE(AbcCoreAbstractTimeSamplingTest TestTimeSampling.cpp) TARGET_LINK_LIBRARIES(AbcCoreAbstractTimeSamplingTest Alembic) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/AbcCoreHDF5/Tests/CMakeLists.txt new/alembic-1.8.4/lib/Alembic/AbcCoreHDF5/Tests/CMakeLists.txt --- old/alembic-1.8.3/lib/Alembic/AbcCoreHDF5/Tests/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/AbcCoreHDF5/Tests/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -33,7 +33,7 @@ ## ##-***************************************************************************** -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) +INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIRS}) SET(CXX_FILES ArchiveTests.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/AbcCoreLayer/Tests/CMakeLists.txt new/alembic-1.8.4/lib/Alembic/AbcCoreLayer/Tests/CMakeLists.txt --- old/alembic-1.8.3/lib/Alembic/AbcCoreLayer/Tests/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/AbcCoreLayer/Tests/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -33,7 +33,7 @@ ## ##-***************************************************************************** -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) SET(CXX_FILES ObjectTests.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/ReadUtil.cpp new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/ReadUtil.cpp --- old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/ReadUtil.cpp 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/ReadUtil.cpp 2022-11-12 04:51:47.000000000 +0100 @@ -1477,7 +1477,7 @@ while ( pos < bufSize ) { // make sure maxSample, tpc, and numSamples - // don't go beyond our butter + // don't go beyond our buffer if ( pos + 8 + sizeof( chrono_t ) > bufSize) { ABCA_THROW("Read invalid: TimeSamples info."); @@ -1494,8 +1494,9 @@ Util::uint32_t numSamples = DerefUnaligned<Util::uint32_t>(&buf[pos]); pos += 4; - // make sure our numSamples don't go beyond the buffer - if ( pos + sizeof( chrono_t ) * numSamples > bufSize) + // make sure our numSamples don't go beyond the buffer and that we + // have at least 1 of them + if ( numSamples < 1 || pos + sizeof( chrono_t ) * numSamples > bufSize) { ABCA_THROW("Read invalid: TimeSamples sample times."); } @@ -1558,7 +1559,7 @@ Util::uint32_t nameSize = DerefUnaligned<Util::uint32_t>(&buf[pos]); pos += 4; - if (pos + nameSize + 1 > bufSize) + if (nameSize == 0 || pos + nameSize + 1 > bufSize) { ABCA_THROW("Read invalid: Object Headers name and MetaData index."); } @@ -1801,8 +1802,7 @@ } Util::uint32_t nameSize = GetUint32WithHint( buf, bufSize, sizeHint, pos ); - - if (pos + nameSize > bufSize) + if ( nameSize == 0 || pos + nameSize > bufSize ) { ABCA_THROW("Read invalid: Property Headers name."); } @@ -1860,6 +1860,13 @@ // add the default empty meta data oMetaDataVec.push_back( AbcA::MetaData() ); + // we only index small meta data, under 256 bytes each + // and we only allow 256 indices + if ( iData->getSize() > 65536 ) + { + ABCA_THROW("Read invalid: Indexed MetaData buffer unexpectedly big."); + } + std::vector< char > buf( iData->getSize() ); if ( buf.empty() ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/StreamManager.cpp new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/StreamManager.cpp --- old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/StreamManager.cpp 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/StreamManager.cpp 2022-11-12 04:51:47.000000000 +0100 @@ -62,12 +62,38 @@ #endif #ifdef _MSC_VER + +#ifdef _WIN64 Alembic::Util::int64_t ffsll( Alembic::Util::int64_t iValue ) { unsigned long index = 0; _BitScanForward64(&index, iValue); return index; } +#else +Alembic::Util::int64_t ffsll( Alembic::Util::int64_t iValue ) +{ + unsigned long index = 0; + Alembic::Util::uint64_t value(iValue); + + // check the bottom 4 bytes + _BitScanForward(&index, value & 0xffffffff); + if ( index > 0 ) + { + return index; + } + + // now the top 4 + _BitScanForward(&index, value >> 32); + if ( index > 0 ) + { + // + 32 because this is the top 4 bytes, bottom 4 is 0 + return index + 32; + } + + return index; +} +#endif #endif StreamManager::StreamManager( std::size_t iNumStreams ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/Tests/CMakeLists.txt new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/Tests/CMakeLists.txt --- old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/Tests/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/Tests/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -33,7 +33,7 @@ ## ##-***************************************************************************** -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) SET(CXX_FILES ArchiveTests.cpp @@ -103,4 +103,10 @@ file(COPY fuzzer_issue25502.abc DESTINATION .) file(COPY fuzzer_issue25695.abc DESTINATION .) file(COPY fuzzer_issue26125.abc DESTINATION .) -file(COPY fuzzer_issue33685.abc DESTINATION .) \ No newline at end of file +file(COPY fuzzer_issue33685.abc DESTINATION .) +file(COPY fuzzer_issue49213.abc DESTINATION .) +file(COPY fuzzer_issue52703.abc DESTINATION .) +file(COPY fuzzer_issue52939.abc DESTINATION .) +file(COPY fuzzer_issue53205.abc DESTINATION .) +file(COPY fuzzer_Taotao_Gu_3513.abc DESTINATION .) +file(COPY fuzzer_Taotao_Gu_3699.abc DESTINATION .) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp --- old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/Tests/fuzzTest.cpp 2022-11-12 04:51:47.000000000 +0100 @@ -291,7 +291,7 @@ } catch(const std::exception& e) { - std::string msg = "Read invalid: Object Headers MetaData index."; + std::string msg = "Read invalid: Object Headers name and MetaData index."; TESTING_ASSERT(msg == e.what()); return; } @@ -433,7 +433,7 @@ } catch(const std::exception& e) { - std::string msg = "Read invalid: Property Header MetaData index."; + std::string msg = "Read invalid: Property Headers name."; TESTING_ASSERT(msg == e.what()); return; } @@ -451,7 +451,7 @@ } catch(const std::exception& e) { - std::string msg = "Read invalid: Property Header MetaData index."; + std::string msg = "Read invalid: Property Headers name."; TESTING_ASSERT(msg == e.what()); return; } @@ -468,7 +468,7 @@ } catch(const std::exception& e) { - std::string msg = "Read invalid: Property Header MetaData index."; + std::string msg = "Read invalid: Property Headers name."; TESTING_ASSERT(msg == e.what()); return; } @@ -490,7 +490,7 @@ // we got the second error message, for now guard // against it as well std::string msg = e.what(); - TESTING_ASSERT(msg == "Ogawa IStreams::read failed." || + TESTING_ASSERT(msg == "Read invalid: Object Headers name and MetaData index." || msg == "Ogawa IData illegal size."); return; } @@ -525,7 +525,7 @@ } catch(const std::exception& e) { - std::string msg = "Read invalid: Property Header MetaData index."; + std::string msg = "Read invalid: Property Headers name."; TESTING_ASSERT(msg == e.what()); return; } @@ -542,7 +542,7 @@ } catch(const std::exception& e) { - std::string msg = "Read invalid: Property Header MetaData index."; + std::string msg = "Read invalid: Property Headers name."; TESTING_ASSERT(msg == e.what()); return; } @@ -587,25 +587,31 @@ void testFuzzer26125(bool iUseMMap) { Alembic::AbcCoreOgawa::ReadArchive r(1, iUseMMap); - ABCA::ArchiveReaderPtr ar = r("fuzzer_issue26125.abc"); - try { - walkJustObj(ar->getTop()); + ABCA::ArchiveReaderPtr ar = r("fuzzer_issue26125.abc"); } catch(const std::exception& e) { - std::string msg = "Invalid object data group"; + std::string msg = "Read invalid: Object Headers name and MetaData index."; TESTING_ASSERT(msg == e.what()); + return; } + TESTING_ASSERT(0); +} + +void testFuzzer33685(bool iUseMMap) +{ + Alembic::AbcCoreOgawa::ReadArchive r(1, iUseMMap); + try { - walkObj(ar->getTop()); + ABCA::ArchiveReaderPtr ar = r("fuzzer_issue33685.abc"); } catch(const std::exception& e) { - std::string msg = "Invalid object data group"; + std::string msg = "Read invalid: Object Headers name and MetaData index."; TESTING_ASSERT(msg == e.what()); return; } @@ -613,21 +619,81 @@ TESTING_ASSERT(0); } -void testFuzzer33685(bool iUseMMap) +// This one ended up getting flagged for using too much memory +// which is where we noticed that empty property and object names +// were getting through AND a way too large Indexed meta data buffer +void testFuzzer49213(bool iUseMMap) { Alembic::AbcCoreOgawa::ReadArchive r(1, iUseMMap); - ABCA::ArchiveReaderPtr ar = r("fuzzer_issue33685.abc"); try { - walkJustObj(ar->getTop()); + ABCA::ArchiveReaderPtr ar = r("fuzzer_issue49213.abc"); } catch(const std::exception& e) { - std::string msg = "Invalid object data group"; + std::string msg = "Read invalid: Indexed MetaData buffer unexpectedly big."; + TESTING_ASSERT(msg == e.what()); + return; + } + + TESTING_ASSERT(0); +} + +void testFuzzer52703(bool iUseMMap) +{ + Alembic::AbcCoreOgawa::ReadArchive r(1, iUseMMap); + try + { + ABCA::ArchiveReaderPtr ar = r("fuzzer_issue52703.abc"); + } + catch(const std::exception& e) + { + std::string msg = "Read invalid: TimeSamples sample times."; TESTING_ASSERT(msg == e.what()); + return; + } + + TESTING_ASSERT(0); +} + +void testFuzzer52939(bool iUseMMap) +{ + Alembic::AbcCoreOgawa::ReadArchive r(1, iUseMMap); + + ABCA::ArchiveReaderPtr ar = r("fuzzer_issue52939.abc"); + ABCA::MetaData md = ar->getMetaData(); + ABCA::MetaData::token_map_type::const_iterator it = md.begin(); + // bad metadata ends up getting ignored + TESTING_ASSERT(md.size() == 0); +} + +void testFuzzere53205(bool iUseMMap) +{ + Alembic::AbcCoreOgawa::ReadArchive r(1, iUseMMap); + + ABCA::ArchiveReaderPtr ar = r("fuzzer_issue53205.abc"); + TESTING_ASSERT(ar->getNumTimeSamplings() == 0); +} + +void testFuzzerTaoTaoGu3513(bool iUseMMap) +{ + Alembic::AbcCoreOgawa::ReadArchive r(1, iUseMMap); + ABCA::ArchiveReaderPtr ar = r("fuzzer_Taotao_Gu_3513.abc"); + + ABCA::MetaData md = ar->getMetaData(); + try + { + md.serialize(); + } + catch(const std::exception& e) + { + std::string msg = "TokenMap::get: Token-Value pair contains separator characters: ; or = for"; + std::string what = e.what(); + TESTING_ASSERT(what.substr(0, msg.size()) == msg); } + walkJustObj(ar->getTop()); try { walkObj(ar->getTop()); @@ -638,6 +704,26 @@ TESTING_ASSERT(msg == e.what()); return; } + + TESTING_ASSERT(0); +} + +void testFuzzerTaoTaoGu3699(bool iUseMMap) +{ + Alembic::AbcCoreOgawa::ReadArchive r(1, iUseMMap); + + try + { + ABCA::ArchiveReaderPtr ar = r("fuzzer_Taotao_Gu_3699.abc"); + } + catch(const std::exception& e) + { + std::string msg = "Read invalid: TimeSamples sample times."; + TESTING_ASSERT(msg == e.what()); + return; + } + + TESTING_ASSERT(0); } int main ( int argc, char *argv[] ) @@ -723,5 +809,22 @@ testFuzzer33685(true); testFuzzer33685(false); + testFuzzer49213(true); + testFuzzer49213(false); + + testFuzzer52703(true); + testFuzzer52703(false); + + testFuzzer52939(true); + testFuzzer52939(false); + + testFuzzere53205(true); + testFuzzere53205(false); + + testFuzzerTaoTaoGu3513(true); + testFuzzerTaoTaoGu3513(false); + + testFuzzerTaoTaoGu3699(true); + testFuzzerTaoTaoGu3699(false); return 0; } Binary files old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/Tests/fuzzer_Taotao_Gu_3513.abc and new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/Tests/fuzzer_Taotao_Gu_3513.abc differ Binary files old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/Tests/fuzzer_Taotao_Gu_3699.abc and new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/Tests/fuzzer_Taotao_Gu_3699.abc differ Binary files old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/Tests/fuzzer_issue49213.abc and new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/Tests/fuzzer_issue49213.abc differ Binary files old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/Tests/fuzzer_issue52703.abc and new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/Tests/fuzzer_issue52703.abc differ Binary files old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/Tests/fuzzer_issue52939.abc and new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/Tests/fuzzer_issue52939.abc differ Binary files old/alembic-1.8.3/lib/Alembic/AbcCoreOgawa/Tests/fuzzer_issue53205.abc and new/alembic-1.8.4/lib/Alembic/AbcCoreOgawa/Tests/fuzzer_issue53205.abc differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/AbcGeom/Tests/CMakeLists.txt new/alembic-1.8.4/lib/Alembic/AbcGeom/Tests/CMakeLists.txt --- old/alembic-1.8.3/lib/Alembic/AbcGeom/Tests/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/AbcGeom/Tests/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -33,7 +33,7 @@ ## ##-***************************************************************************** -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) ADD_EXECUTABLE(AbcGeom_PolyMeshTest MeshData.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/AbcMaterial/Tests/CMakeLists.txt new/alembic-1.8.4/lib/Alembic/AbcMaterial/Tests/CMakeLists.txt --- old/alembic-1.8.3/lib/Alembic/AbcMaterial/Tests/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/AbcMaterial/Tests/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -33,7 +33,7 @@ ## ##-***************************************************************************** -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) ADD_EXECUTABLE(AbcMaterial_WriteMaterialTest WriteMaterial.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/CMakeLists.txt new/alembic-1.8.4/lib/Alembic/CMakeLists.txt --- old/alembic-1.8.3/lib/Alembic/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -52,7 +52,7 @@ TARGET_INCLUDE_DIRECTORIES(Alembic PUBLIC - $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/lib> + $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/lib> $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/lib> $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include> ${ALEMBIC_ILMBASE_INCLUDE_DIRECTORY} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/Ogawa/Tests/CMakeLists.txt new/alembic-1.8.4/lib/Alembic/Ogawa/Tests/CMakeLists.txt --- old/alembic-1.8.3/lib/Alembic/Ogawa/Tests/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/Ogawa/Tests/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -33,7 +33,7 @@ ## ##-***************************************************************************** -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) ADD_EXECUTABLE(AlembicOgawaArchive_Test ArchiveTest.cpp) TARGET_LINK_LIBRARIES(AlembicOgawaArchive_Test Alembic Alembic) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/Util/Tests/CMakeLists.txt new/alembic-1.8.4/lib/Alembic/Util/Tests/CMakeLists.txt --- old/alembic-1.8.3/lib/Alembic/Util/Tests/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/Util/Tests/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -33,7 +33,7 @@ ## ##-***************************************************************************** -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/lib ${PROJECT_BINARY_DIR}/lib) ADD_EXECUTABLE(AlembicUtilOperatorBool_Test OperatorBoolTest.cpp) TARGET_LINK_LIBRARIES(AlembicUtilOperatorBool_Test Alembic) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/lib/Alembic/Util/TokenMap.cpp new/alembic-1.8.4/lib/Alembic/Util/TokenMap.cpp --- old/alembic-1.8.3/lib/Alembic/Util/TokenMap.cpp 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/lib/Alembic/Util/TokenMap.cpp 2022-11-12 04:51:47.000000000 +0100 @@ -89,6 +89,16 @@ std::size_t curPair = config.find(pairSep, lastPair); std::size_t curAssign = config.find(assignSep, lastPair); + if (curAssign > curPair) + { + if ( !quiet ) + { + ALEMBIC_THROW( "TokenMap::setUnique: malformed string found:" + << assignSep << " before: " << pairSep); + } + return; + } + if (curAssign != std::string::npos) { std::size_t endPos = std::string::npos; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/python/PyAlembic/CMakeLists.txt new/alembic-1.8.4/python/PyAlembic/CMakeLists.txt --- old/alembic-1.8.3/python/PyAlembic/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/python/PyAlembic/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -146,8 +146,8 @@ ENDIF () ENDIF () -INCLUDE_DIRECTORIES("${PYTHON_INCLUDE_DIR}" "${CMAKE_SOURCE_DIR}/lib" - "${CMAKE_SOURCE_DIR}/python/PyAlembic") +INCLUDE_DIRECTORIES("${PYTHON_INCLUDE_DIR}" "${PROJECT_SOURCE_DIR}/lib" + "${PROJECT_SOURCE_DIR}/python/PyAlembic") ADD_LIBRARY(alembic SHARED ${CPP_FILES}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/python/PyAlembic/PyITypedArrayProperty.cpp new/alembic-1.8.4/python/PyAlembic/PyITypedArrayProperty.cpp --- old/alembic-1.8.3/python/PyAlembic/PyITypedArrayProperty.cpp 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/python/PyAlembic/PyITypedArrayProperty.cpp 2022-11-12 04:51:47.000000000 +0100 @@ -160,8 +160,8 @@ register_<Abc::IC4fArrayProperty>( "IC4fArrayProperty" ); register_<Abc::IC4cArrayProperty>( "IC4cArrayProperty" ); - register_<Abc::IN2fArrayProperty>( "IN3fArrayProperty" ); - register_<Abc::IN2dArrayProperty>( "IN3dArrayProperty" ); + register_<Abc::IN2fArrayProperty>( "IN2fArrayProperty" ); + register_<Abc::IN2dArrayProperty>( "IN2dArrayProperty" ); register_<Abc::IN3fArrayProperty>( "IN3fArrayProperty" ); register_<Abc::IN3dArrayProperty>( "IN3dArrayProperty" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/python/PyAlembic/PyITypedScalarProperty.cpp new/alembic-1.8.4/python/PyAlembic/PyITypedScalarProperty.cpp --- old/alembic-1.8.3/python/PyAlembic/PyITypedScalarProperty.cpp 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/python/PyAlembic/PyITypedScalarProperty.cpp 2022-11-12 04:51:47.000000000 +0100 @@ -158,8 +158,8 @@ register_<Abc::IC4fProperty>( "IC4fProperty" ); register_<Abc::IC4cProperty>( "IC4cProperty" ); - register_<Abc::IN2fProperty>( "IN3fProperty" ); - register_<Abc::IN2dProperty>( "IN3dProperty" ); + register_<Abc::IN2fProperty>( "IN2fProperty" ); + register_<Abc::IN2dProperty>( "IN2dProperty" ); register_<Abc::IN3fProperty>( "IN3fProperty" ); register_<Abc::IN3dProperty>( "IN3dProperty" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/python/PyAlembic/PyOTypedArrayProperty.cpp new/alembic-1.8.4/python/PyAlembic/PyOTypedArrayProperty.cpp --- old/alembic-1.8.3/python/PyAlembic/PyOTypedArrayProperty.cpp 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/python/PyAlembic/PyOTypedArrayProperty.cpp 2022-11-12 04:51:47.000000000 +0100 @@ -161,8 +161,8 @@ register_<Abc::OC4fArrayProperty>( "OC4fArrayProperty" ); register_<Abc::OC4cArrayProperty>( "OC4cArrayProperty" ); - register_<Abc::ON2fArrayProperty>( "ON3fArrayProperty" ); - register_<Abc::ON2dArrayProperty>( "ON3dArrayProperty" ); + register_<Abc::ON2fArrayProperty>( "ON2fArrayProperty" ); + register_<Abc::ON2dArrayProperty>( "ON2dArrayProperty" ); register_<Abc::ON3fArrayProperty>( "ON3fArrayProperty" ); register_<Abc::ON3dArrayProperty>( "ON3dArrayProperty" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/python/PyAlembic/PyOTypedScalarProperty.cpp new/alembic-1.8.4/python/PyAlembic/PyOTypedScalarProperty.cpp --- old/alembic-1.8.3/python/PyAlembic/PyOTypedScalarProperty.cpp 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/python/PyAlembic/PyOTypedScalarProperty.cpp 2022-11-12 04:51:47.000000000 +0100 @@ -161,8 +161,8 @@ register_<Abc::OC4fProperty>( "OC4fProperty" ); register_<Abc::OC4cProperty>( "OC4cProperty" ); - register_<Abc::ON2fProperty>( "ON3fProperty" ); - register_<Abc::ON2dProperty>( "ON3dProperty" ); + register_<Abc::ON2fProperty>( "ON2fProperty" ); + register_<Abc::ON2dProperty>( "ON2dProperty" ); register_<Abc::ON3fProperty>( "ON3fProperty" ); register_<Abc::ON3dProperty>( "ON3dProperty" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/python/PyAlembic/Tests/CMakeLists.txt new/alembic-1.8.4/python/PyAlembic/Tests/CMakeLists.txt --- old/alembic-1.8.3/python/PyAlembic/Tests/CMakeLists.txt 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/python/PyAlembic/Tests/CMakeLists.txt 2022-11-12 04:51:47.000000000 +0100 @@ -44,7 +44,7 @@ ${EXTERNAL_MATH_LIBS} ) -INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/python/PyAlembic/Tests") +INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/python/PyAlembic/Tests") IF (Imath_FOUND) GET_TARGET_PROPERTY(PYIMATH_LOCATION ${ALEMBIC_PYILMBASE_PYIMATH_LIB} IMPORTED_LOCATION_RELEASE) ADD_TEST(NAME PyAlembic_Python_TEST COMMAND Python${PYALEMBIC_PYTHON_MAJOR}::Interpreter ${PROJECT_SOURCE_DIR}/python/PyAlembic/Tests/RunTests.py ${PYIMATH_LOCATION}/../python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages ${PROJECT_BINARY_DIR}/python/PyAlembic) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alembic-1.8.3/python/PyAlembic/Tests/testPolyMesh.py new/alembic-1.8.4/python/PyAlembic/Tests/testPolyMesh.py --- old/alembic-1.8.3/python/PyAlembic/Tests/testPolyMesh.py 2021-09-11 19:58:47.000000000 +0200 +++ new/alembic-1.8.4/python/PyAlembic/Tests/testPolyMesh.py 2022-11-12 04:51:47.000000000 +0100 @@ -65,6 +65,10 @@ mesh.set( mesh_samp ) mesh.set( mesh_samp ) + userProp = mesh.getUserProperties() + n2f = ON2fProperty(userProp, 'n2f') + n2f.setValue(V2f(1.0, 2.0)) + def testMeshImport(self): """read an iarchive with a mesh in it""" @@ -110,6 +114,10 @@ for i in range( len( positions ) ): self.assertEqual(positions[i], verts[i]) + userProp = mesh.getUserProperties() + n2f = IN2fProperty(userProp, 'n2f') + self.assertEqual(n2f.getValue(0), V2f(1.0, 2.0)) + def testMeshLayerExport(self): """write a boring oarchive with a mesh and an oarchive with just uvs"""