assimp-6.0.2-5.fc44

List of Findings

Error: CPPCHECK_WARNING (CWE-562): [#def1]
assimp-6.0.2/code/AssetLib/3DS/3DSLoader.cpp:150: error[danglingLifetime]: Non-local variable 'mCurrentNode' will use pointer to local variable '_rootNode'.
#  148|       D3DS::Node _rootNode("UNNAMED");
#  149|       mLastNodeIndex = -1;
#  150|->     mCurrentNode = &_rootNode;
#  151|       mRootNode = mCurrentNode;
#  152|       mRootNode->mHierarchyPos = -1;

Error: CPPCHECK_WARNING: [#def2]
assimp-6.0.2/code/AssetLib/ASE/ASEParser.h:79: error[internalError]: Analysis failed (variable without scope). If the code is valid then please report this failure.
#   77|       }
#   78|   
#   79|->     Material(const Material &other) = default;
#   80|   
#   81|       Material &operator=(const Material &other) {

Error: CPPCHECK_WARNING (CWE-562): [#def3]
assimp-6.0.2/code/AssetLib/HMP/HMPLoader.cpp:121: error[danglingLifetime]: Non-local variable 'mBuffer' will use pointer to local variable 'buffer'.
#  119|       std::unique_ptr<uint8_t[], decltype(deleter)> buffer(new uint8_t[fileSize], deleter);
#  120|       mBuffer = buffer.get();
#  121|->     file->Read((void *)mBuffer, 1, fileSize);
#  122|       iFileSize = (unsigned int)fileSize;
#  123|   

Error: CPPCHECK_WARNING (CWE-457): [#def4]
assimp-6.0.2/code/AssetLib/IFC/IFCGeometry.cpp:180: warning[uninitvar]: Uninitialized variable: outer_vit
#  178|       temp.mVerts.reserve(outer_polygon_size);
#  179|       temp.mVertcnt.push_back(static_cast<unsigned int>(outer_polygon_size));
#  180|->     std::copy(outer_vit, outer_vit+outer_polygon_size,
#  181|           std::back_inserter(temp.mVerts));
#  182|   

Error: CPPCHECK_WARNING (CWE-456): [#def5]
assimp-6.0.2/code/AssetLib/IFC/IFCLoader.cpp:190: error[uninitdata]: Memory is allocated but not initialized: buffer
#  188|                       unsigned bufferSize = fileInfo.uncompressed_size < INT16_MAX ? static_cast<unsigned>(fileInfo.uncompressed_size) : INT16_MAX;
#  189|                       void *buffer = malloc(bufferSize);
#  190|->                     read = unzReadCurrentFile(zip, buffer, bufferSize);
#  191|                       if (read > 0) {
#  192|                           memcpy((char *)buff + total, buffer, read);

Error: CPPCHECK_WARNING (CWE-562): [#def6]
assimp-6.0.2/code/AssetLib/MDC/MDCLoader.cpp:210: error[danglingLifetime]: Non-local variable 'mBuffer' will use pointer to local variable 'mBuffer2'.
#  208|       std::vector<unsigned char> mBuffer2(fileSize);
#  209|       file->Read(&mBuffer2[0], 1, fileSize);
#  210|->     mBuffer = &mBuffer2[0];
#  211|   
#  212|       // validate the file header

Error: CPPCHECK_WARNING (CWE-562): [#def7]
assimp-6.0.2/code/AssetLib/MDC/MDCLoader.cpp:213: error[danglingLifetime]: Non-local variable 'mBuffer' will use pointer to local variable 'mBuffer2'.
#  211|   
#  212|       // validate the file header
#  213|->     this->pcHeader = (BE_NCONST MDC::Header *)this->mBuffer;
#  214|       this->ValidateHeader();
#  215|   

Error: COMPILER_WARNING: [#def8]
assimp-6.0.2/code/AssetLib/MS3D/MS3DLoader.cpp: scope_hint: In member function ‘virtual void Assimp::MS3DImporter::InternReadFile(const std::string&, aiScene*, Assimp::IOSystem*)’
assimp-6.0.2/code/AssetLib/MS3D/MS3DLoader.cpp:636:28: warning[-Wunused-but-set-variable=]: variable ‘qu’ set but not used
#  636 |                 aiQuatKey* qu = nd->mRotationKeys;
#      |                            ^~
#  634|                   nd->mPositionKeys = new aiVectorKey[(*it).posFrames.size()];
#  635|   
#  636|->                 aiQuatKey* qu = nd->mRotationKeys;
#  637|                   for(std::vector<TempKeyFrame>::const_iterator pos = (*it).posFrames.begin(); pos != (*it).posFrames.end(); ++pos,++qu) {
#  638|                       aiVectorKey& v = nd->mPositionKeys[nd->mNumPositionKeys++];

Error: CPPCHECK_WARNING (CWE-664): [#def9]
assimp-6.0.2/code/Common/SceneCombiner.cpp:756: error[mismatchingContainers]: Iterators of different containers '(*boneIt).pSrcBones' and 'boneIt->pSrcBones' are used together.
#  754|           // And copy the final weights - adjust the vertex IDs by the
#  755|           // face index offset of the corresponding mesh.
#  756|->         for (std::vector<BoneSrcIndex>::const_iterator wmit = (*boneIt).pSrcBones.begin(); wmit != (*boneIt).pSrcBones.end(); ++wmit) {
#  757|               if (wmit == wend) {
#  758|                   break;

Error: CPPCHECK_WARNING (CWE-476): [#def10]
assimp-6.0.2/code/Common/ZipArchiveIOSystem.cpp:132: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: disk_filename
#  130|   
#  131|       char *disk_filename = (char*)malloc(io_stream->m_Filename.length() + 1);
#  132|->     strncpy(disk_filename, io_stream->m_Filename.c_str(), io_stream->m_Filename.length() + 1);
#  133|       for (i = (int)io_stream->m_Filename.length() - 1; i >= 0; i -= 1)
#  134|       {

Error: CPPCHECK_WARNING (CWE-476): [#def11]
assimp-6.0.2/code/Common/ZipArchiveIOSystem.cpp:135: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: disk_filename
#  133|       for (i = (int)io_stream->m_Filename.length() - 1; i >= 0; i -= 1)
#  134|       {
#  135|->         if (disk_filename[i] != '.')
#  136|               continue;
#  137|           snprintf(&disk_filename[i], io_stream->m_Filename.length() - size_t(i), ".z%02u", number_disk + 1);

Error: CPPCHECK_WARNING (CWE-758): [#def12]
assimp-6.0.2/contrib/Open3DGC/o3dgcArithmeticCodec.h:228: error[shiftTooManyBits]: Shifting 32-bit value by 4294967295 bits is undefined behaviour
#  226|                              while (k--) // next binary part
#  227|                              {
#  228|->                                encode((signed short)((symbol>>k)&1), bModel0);
#  229|                              }
#  230|                              break;

Error: CPPCHECK_WARNING (CWE-404): [#def13]
assimp-6.0.2/contrib/Open3DGC/o3dgcBinaryStream.h:385: error[resourceLeak]: Resource leak: fin
#  383|                                       if (nread != size)
#  384|                                       {
#  385|->                                         return O3DGC_ERROR_READ_FILE;
#  386|                                       }
#  387|                                       fclose(fin);

Error: CPPCHECK_WARNING (CWE-457): [#def14]
assimp-6.0.2/contrib/unzip/unzip.c:518: warning[uninitvar]: Uninitialized variable: *pzlib_filefunc64_32_def.zopen32_file
#  516|           fill_fopen64_filefunc(&us.z_filefunc.zfile_func64);
#  517|       else
#  518|->         us.z_filefunc = *pzlib_filefunc64_32_def;
#  519|       us.is64bitOpenFunction = is64bitOpenFunction;
#  520|   

Error: COMPILER_WARNING: [#def15]
assimp-6.0.2/contrib/zip/src/zip.c:44: included_from: Included from here.
assimp-6.0.2/contrib/zip/src/miniz.h:5108:9: note: ‘#pragma message: Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.’
# 5106|   
# 5107|   #else
# 5108|-> #pragma message(                                                               \
# 5109|       "Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.")
# 5110|   #ifndef MINIZ_NO_TIME

Error: COMPILER_WARNING: [#def16]
assimp-6.0.2/test/unit/utProfiler.cpp: scope_hint: In member function ‘virtual void utProfiler_addRegion_success_Test::TestBody()’
assimp-6.0.2/test/unit/utProfiler.cpp:71:22: warning[-Wunused-but-set-variable=]: variable ‘j’ set but not used
#   71 |         volatile int j=0;
#      |                      ^
#   69|       myProfiler.BeginRegion( "t1" );
#   70|       for ( int i=0; i<10; i++ ) {
#   71|->         volatile int j=0;
#   72|           j++;
#   73|       }

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-35.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameassimp-6.0.2-5.fc44
store-results-to/tmp/tmp235m4vba/assimp-6.0.2-5.fc44.tar.xz
time-created2026-01-08 15:34:49
time-finished2026-01-08 15:41:15
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp235m4vba/assimp-6.0.2-5.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp235m4vba/assimp-6.0.2-5.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9