kf6-kservice-6.13.0-1.fc43

List of Findings

Error: COMPILER_WARNING (CWE-252): [#def1]
kservice-6.13.0/src/sycoca/kbuildsycoca.cpp: scope_hint: In member function ‘bool KBuildSycoca::recreate(bool)’
kservice-6.13.0/src/sycoca/kbuildsycoca.cpp:423:23: warning[-Wunused-result]: ignoring return value of ‘int fchown(int, __uid_t, __gid_t)’ declared with attribute ‘warn_unused_result’
#  423 |                 fchown(database.handle(), uid, gid);
#      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  421|               const int gid = qEnvironmentVariableIntValue("SUDO_GID");
#  422|               if (uid && gid) {
#  423|->                 fchown(database.handle(), uid, gid);
#  424|               }
#  425|           }

Error: COMPILER_WARNING (CWE-843): [#def2]
kservice-6.13.0/src/sycoca/kmemfile.cpp: scope_hint: In member function ‘virtual bool KMemFile::open(QIODeviceBase::OpenMode)’
kservice-6.13.0/src/sycoca/kmemfile.cpp:168:15: warning[-Wclass-memaccess]: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct KMemFile::Private::sharedInfoData’; use assignment or value-initialization instead
#  168 |         memset(infoPtr, 0, sizeof(Private::sharedInfoData));
#      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kservice-6.13.0/src/sycoca/kmemfile.cpp:21:12: note: ‘struct KMemFile::Private::sharedInfoData’ declared here
#   21 |     struct sharedInfoData {
#      |            ^~~~~~~~~~~~~~
#  166|           // no -> create it
#  167|           infoPtr = static_cast<Private::sharedInfoData *>(d->shmInfo.data());
#  168|->         memset(infoPtr, 0, sizeof(Private::sharedInfoData));
#  169|           infoPtr->shmCounter = 1;
#  170|           if (!d->loadContentsFromFile()) {

Error: COMPILER_WARNING: [#def3]
kservice-6.13.0/src/sycoca/ksycocafactory.cpp: scope_hint: In member function ‘allEntries’
kservice-6.13.0/src/sycoca/ksycocafactory.cpp:196:47: warning[-Walloc-size-larger-than=]: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807
#  196 |     qint32 *offsetList = new qint32[entryCount];
#      |                                               ^
/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)
#      |                          ^
#  194|   
#  195|       // offsetList is needed because createEntry() modifies the stream position
#  196|->     qint32 *offsetList = new qint32[entryCount];
#  197|       for (int i = 0; i < entryCount; i++) {
#  198|           (*str) >> offsetList[i];

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-157.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namekf6-kservice-6.13.0-1.fc43
store-results-to/tmp/tmpobz0pmuw/kf6-kservice-6.13.0-1.fc43.tar.xz
time-created2025-04-25 13:33:08
time-finished2025-04-25 13:35:05
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpobz0pmuw/kf6-kservice-6.13.0-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpobz0pmuw/kf6-kservice-6.13.0-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9