kf6-kdesu-6.13.0-1.fc43

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-131): [#def1]
kdesu-6.13.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]
kdesu-6.13.0/src/kdesu_stub.c: scope_hint: In function ‘main’
kdesu-6.13.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]
kdesu-6.13.0/src/kdesud/kdesud.cpp: scope_hint: In function ‘void sigchld_handler(int)’
kdesu-6.13.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]
kdesu-6.13.0/src/kdesud/kdesud.cpp: scope_hint: In function ‘int main(int, char**)’
kdesu-6.13.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]
kdesu-6.13.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]
kdesu-6.13.0/src/ptyprocess.cpp: scope_hint: In member function ‘void KDESu::PtyProcess::writeLine(const QByteArray&, bool)’
kdesu-6.13.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]
kdesu-6.13.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]
kdesu-6.13.0/src/sshprocess.cpp: scope_hint: In member function ‘int KDESu::SshProcess::converseSsh(const char*, int)’
kdesu-6.13.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]
kdesu-6.13.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]
kdesu-6.13.0/src/suprocess.cpp: scope_hint: In member function ‘int KDESu::SuProcess::converseSU(const char*)’
kdesu-6.13.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]
kdesu-6.13.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.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-232.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-kdesu-6.13.0-1.fc43
store-results-to/tmp/tmpn2wri0kg/kf6-kdesu-6.13.0-1.fc43.tar.xz
time-created2025-04-25 13:24:27
time-finished2025-04-25 13:26:05
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpn2wri0kg/kf6-kdesu-6.13.0-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpn2wri0kg/kf6-kdesu-6.13.0-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9