kf6-kdesu-6.8.0-1.fc42

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-131): [#def1]
kf6-kdesu-6.8.0-build/kdesu-6.8.0/src/kdesu_stub.c: scope_hint: In function ‘xrealloc’
kf6-kdesu-6.8.0-build/kdesu-6.8.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: COMPILER_WARNING (CWE-252): [#def2]
kf6-kdesu-6.8.0-build/kdesu-6.8.0/src/kdesu_stub.c: scope_hint: In function ‘main’
kf6-kdesu-6.8.0-build/kdesu-6.8.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): [#def3]
kf6-kdesu-6.8.0-build/kdesu-6.8.0/src/kdesud/kdesud.cpp: scope_hint: In function ‘void sigchld_handler(int)’
kf6-kdesu-6.8.0-build/kdesu-6.8.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): [#def4]
kf6-kdesu-6.8.0-build/kdesu-6.8.0/src/kdesud/kdesud.cpp: scope_hint: In function ‘int main(int, char**)’
kf6-kdesu-6.8.0-build/kdesu-6.8.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): [#def5]
kf6-kdesu-6.8.0-build/kdesu-6.8.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): [#def6]
kf6-kdesu-6.8.0-build/kdesu-6.8.0/src/ptyprocess.cpp: scope_hint: In member function ‘void KDESu::PtyProcess::writeLine(const QByteArray&, bool)’
kf6-kdesu-6.8.0-build/kdesu-6.8.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): [#def7]
kf6-kdesu-6.8.0-build/kdesu-6.8.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: COMPILER_WARNING (CWE-252): [#def8]
kf6-kdesu-6.8.0-build/kdesu-6.8.0/src/sshprocess.cpp: scope_hint: In member function ‘int KDESu::SshProcess::converseSsh(const char*, int)’
kf6-kdesu-6.8.0-build/kdesu-6.8.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): [#def9]
kf6-kdesu-6.8.0-build/kdesu-6.8.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): [#def10]
kf6-kdesu-6.8.0-build/kdesu-6.8.0/src/suprocess.cpp: scope_hint: In member function ‘int KDESu::SuProcess::converseSU(const char*)’
kf6-kdesu-6.8.0-build/kdesu-6.8.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): [#def11]
kf6-kdesu-6.8.0-build/kdesu-6.8.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-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-37.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namekf6-kdesu-6.8.0-1.fc42
store-results-to/tmp/tmpqugv6nft/kf6-kdesu-6.8.0-1.fc42.tar.xz
time-created2024-11-13 00:42:45
time-finished2024-11-13 00:44:28
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpqugv6nft/kf6-kdesu-6.8.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpqugv6nft/kf6-kdesu-6.8.0-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9