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: COMPILER_WARNING: [#def3] assimp-6.0.2/code/AssetLib/COB/COBLoader.cpp: scope_hint: In member function ‘BuildNodes’ assimp-6.0.2/code/AssetLib/COB/COBLoader.cpp:247:73: warning[-Walloc-size-larger-than=]: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 # 247 | outmesh->mFaces = new aiFace[reflist.second.size()](); # | ^ /usr/include/c++/15/new:140:26: note: in a call to allocation function ‘operator new []’ declared here # 140 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) # | ^ # 245| outmesh->mTextureCoords[0] = new aiVector3D[n]; # 246| # 247|-> outmesh->mFaces = new aiFace[reflist.second.size()](); # 248| for (Face *f : reflist.second) { # 249| if (f->indices.empty()) { Error: CPPCHECK_WARNING (CWE-562): [#def4] 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): [#def5] 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): [#def6] 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): [#def7] 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): [#def8] 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: [#def9] assimp-6.0.2/code/AssetLib/MMD/MMDCpp14.h:74:39: warning[-Walloc-size-larger-than=]: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 # 74 | return std::unique_ptr<T>(new U[n]()); # | ^ /usr/include/c++/15/new: scope_hint: In member function ‘InternReadFile’ /usr/include/c++/15/new:140:26: note: in a call to allocation function ‘operator new []’ declared here # 140 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) # | ^ # 72| make_unique(size_t n) { # 73| typedef typename std::remove_extent<T>::type U; # 74|-> return std::unique_ptr<T>(new U[n]()); # 75| } # 76| Error: COMPILER_WARNING: [#def10] assimp-6.0.2/code/AssetLib/glTF2/glTF2Importer.cpp: scope_hint: In member function ‘ImportMeshes’ assimp-6.0.2/code/AssetLib/glTF2/glTF2Importer.cpp:741:56: warning[-Walloc-size-larger-than=]: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 # 741 | facePtr = faces = new aiFace[nFaces]; # | ^ /usr/include/c++/15/new:140:26: note: in a call to allocation function ‘operator new []’ declared here # 140 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) # | ^ # 739| count = nFaces * 2; # 740| } # 741|-> facePtr = faces = new aiFace[nFaces]; # 742| for (unsigned int i = 0; i < count; i += 2) { # 743| SetFaceAndAdvance2(facePtr, aim->mNumVertices, indexBuffer[i], indexBuffer[i + 1]); Error: CPPCHECK_WARNING (CWE-664): [#def11] 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): [#def12] 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): [#def13] 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): [#def14] 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): [#def15] 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): [#def16] 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: [#def17] 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: CPPCHECK_WARNING (CWE-476): [#def18] assimp-6.0.2/test/unit/utColladaImportExport.cpp:157: warning[nullPointer]: Possible null pointer dereference: itemArray # 155| static inline void CheckUniqueIds(IdNameMap &itemIdMap, unsigned int itemCount, T **itemArray) { # 156| for (size_t idx = 0; idx < itemCount; ++idx) { # 157|-> IdNameString namePair = GetItemIdName(itemArray[idx], idx); # 158| ReportDuplicate(itemIdMap, namePair, typeid(T).name()); # 159| }
| analyzer-version-clippy | 1.90.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-161.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-gcc-latest-x86_64 |
| project-name | assimp-6.0.2-3.fc44 |
| store-results-to | /tmp/tmpoc0vv3s1/assimp-6.0.2-3.fc44.tar.xz |
| time-created | 2025-10-28 17:28:32 |
| time-finished | 2025-10-28 17:35:18 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpoc0vv3s1/assimp-6.0.2-3.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpoc0vv3s1/assimp-6.0.2-3.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |