kf6-kdesu-6.3.0-1.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/kdesu_stub.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-131): [#def2]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/kdesu_stub.c: scope_hint: In function ‘xrealloc’
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/kdesu_stub.c:102:11: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#  100|   char **xrealloc(char **ptr, int size)
#  101|   {
#  102|->     ptr = realloc(ptr, size);
#  103|       if (ptr) {
#  104|           return ptr;

Error: CLANG_WARNING: [#def3]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/kdesu_stub.c:122:5: warning[unix.Malloc]: Potential leak of memory pointed to by 's'
#  120|       strcat(s, "=");
#  121|       strcat(s, value);
#  122|->     return putenv(s); /* yes: no free()! */
#  123|   }
#  124|   

Error: COMPILER_WARNING (CWE-252): [#def4]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/kdesu_stub.c: scope_hint: In function ‘main’
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/kdesu_stub.c:348:9: warning[-Wunused-result]: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’
#  348 |         system("kdeinit5 --suicide");
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  346|   
#  347|       if (strcmp(params[P_XWIN_ONLY].value, "no")) {
#  348|->         system("kdeinit5 --suicide");
#  349|       }
#  350|   

Error: COMPILER_WARNING (CWE-252): [#def5]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/kdesud/kdesud.cpp: scope_hint: In function ‘void sigchld_handler(int)’
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/kdesud/kdesud.cpp:215:10: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  215 |     write(pipeOfDeath[1], &c, 1);
#      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#  213|   {
#  214|       char c = ' ';
#  215|->     write(pipeOfDeath[1], &c, 1);
#  216|   }
#  217|   

Error: COMPILER_WARNING (CWE-252): [#def6]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/kdesud/kdesud.cpp: scope_hint: In function ‘int main(int, char**)’
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/kdesud/kdesud.cpp:418:10: warning[-Wunused-result]: ignoring return value of ‘int pipe2(int*, int)’ declared with attribute ‘warn_unused_result’
#  418 |     pipe2(pipeOfDeath, O_CLOEXEC);
#      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
#  416|       QList<ConnectionHandler *> handler;
#  417|   
#  418|->     pipe2(pipeOfDeath, O_CLOEXEC);
#  419|       maxfd = qMax(maxfd, pipeOfDeath[0]);
#  420|   

Error: COMPILER_WARNING (CWE-252): [#def7]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/kdesud/kdesud.cpp:476:21: warning[-Wunused-result]: ignoring return value of ‘ssize_t read(int, void*, size_t)’ declared with attribute ‘warn_unused_result’
#  476 |                 read(pipeOfDeath[0], buf, 100);
#      |                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
#  474|               if (i == pipeOfDeath[0]) {
#  475|                   char buf[101];
#  476|->                 read(pipeOfDeath[0], buf, 100);
#  477|                   pid_t result;
#  478|                   do {

Error: COMPILER_WARNING (CWE-252): [#def8]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/ptyprocess.cpp: scope_hint: In member function ‘void KDESu::PtyProcess::writeLine(const QByteArray&, bool)’
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/ptyprocess.cpp:254:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  254 |         write(fd(), line.constData(), line.length());
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  252|   {
#  253|       if (!line.isEmpty()) {
#  254|->         write(fd(), line.constData(), line.length());
#  255|       }
#  256|       if (addnl) {

Error: COMPILER_WARNING (CWE-252): [#def9]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/ptyprocess.cpp:257:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  257 |         write(fd(), "\n", 1);
#      |         ~~~~~^~~~~~~~~~~~~~~
#  255|       }
#  256|       if (addnl) {
#  257|->         write(fd(), "\n", 1);
#  258|       }
#  259|   }

Error: CLANG_WARNING: [#def10]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/sshprocess.cpp:124:9: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
#  122|           kill(m_pid, SIGTERM);
#  123|           waitForChild();
#  124|->         ret = SshIncorrectPassword;
#  125|       }
#  126|   

Error: COMPILER_WARNING (CWE-252): [#def11]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/sshprocess.cpp: scope_hint: In member function ‘int KDESu::SshProcess::converseSsh(const char*, int)’
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/sshprocess.cpp:208:22: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  208 |                 write(fd(), password, strlen(password));
#      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  206|                       return -1;
#  207|                   }
#  208|->                 write(fd(), password, strlen(password));
#  209|                   write(fd(), "\n", 1);
#  210|                   state++;

Error: COMPILER_WARNING (CWE-252): [#def12]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/sshprocess.cpp:209:22: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  209 |                 write(fd(), "\n", 1);
#      |                 ~~~~~^~~~~~~~~~~~~~~
#  207|                   }
#  208|                   write(fd(), password, strlen(password));
#  209|->                 write(fd(), "\n", 1);
#  210|                   state++;
#  211|                   break;

Error: COMPILER_WARNING (CWE-252): [#def13]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/suprocess.cpp: scope_hint: In member function ‘int KDESu::SuProcess::converseSU(const char*)’
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/suprocess.cpp:275:22: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  275 |                 write(fd(), password, strlen(password));
#      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  273|                       return error;
#  274|                   }
#  275|->                 write(fd(), password, strlen(password));
#  276|                   write(fd(), "\n", 1);
#  277|                   state = CheckStar;

Error: COMPILER_WARNING (CWE-252): [#def14]
kf6-kdesu-6.3.0-build/kdesu-6.3.0/src/suprocess.cpp:276:22: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  276 |                 write(fd(), "\n", 1);
#      |                 ~~~~~^~~~~~~~~~~~~~~
#  274|                   }
#  275|                   write(fd(), password, strlen(password));
#  276|->                 write(fd(), "\n", 1);
#  277|                   state = CheckStar;
#  278|               }

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-70.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namekf6-kdesu-6.3.0-1.fc41
store-results-to/tmp/tmperb9n1ve/kf6-kdesu-6.3.0-1.fc41.tar.xz
time-created2024-07-03 14:02:23
time-finished2024-07-03 14:03:53
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmperb9n1ve/kf6-kdesu-6.3.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmperb9n1ve/kf6-kdesu-6.3.0-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9