Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
elfutils-0.191-build/elfutils-0.191/libdw/cie.c: scope_hint: In function ‘intern_new_cie’
elfutils-0.191-build/elfutils-0.191/libdw/cie.c:147:6: warning[-Wanalyzer-malloc-leak]: leak of ‘cie’
#  145|   
#  146|     /* Add the new entry to the search tree.  */
#  147|->   if (tsearch (cie, &cache->cie_tree, &compare_cie) == NULL)
#  148|       {
#  149|         free (cie);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def2]
elfutils-0.191-build/elfutils-0.191/libdwfl/bzip2.c:4: included_from: Included from here.
elfutils-0.191-build/elfutils-0.191/libdwfl/gzip.c: scope_hint: In function ‘__libdw_bunzip2’
elfutils-0.191-build/elfutils-0.191/libdwfl/gzip.c:221:4: warning[-Wanalyzer-null-argument]: use of NULL ‘mapped’ where non-null expected
elfutils-0.191-build/elfutils-0.191/libdwfl/gzip.c:224:7: note: in expansion of macro ‘NOMAGIC’
elfutils-0.191-build/elfutils-0.191/libdwfl/gzip.c:224:7: note: in expansion of macro ‘NOMAGIC’
elfutils-0.191-build/elfutils-0.191/libdwfl/gzip.c:224:7: note: in expansion of macro ‘NOMAGIC’
elfutils-0.191-build/elfutils-0.191/libdwfl/libdwflP.h:39: included_from: Included from here.
elfutils-0.191-build/elfutils-0.191/libdwfl/gzip.c:33: included_from: Included from here.
/usr/include/string.h:64:12: note: argument 1 of ‘memcmp’ must be non-null
#  219|   #define NOMAGIC(magic) \
#  220|     (state.mapped_size <= sizeof magic || \
#  221|->    memcmp (mapped, magic, sizeof magic - 1))
#  222|   
#  223|     /* First, look at the header.  */

Error: COMPILER_WARNING: [#def3]
elfutils-0.191-build/elfutils-0.191/src/ar.c: scope_hint: In function ‘main’
elfutils-0.191-build/elfutils-0.191/src/ar.c:139:1: warning[-Wstack-usage=]: stack usage might be unbounded
#  139 | main (int argc, char *argv[])
#      | ^
#  137|   
#  138|   int
#  139|-> main (int argc, char *argv[])
#  140|   {
#  141|     /* We use no threads here which can interfere with handling a stream.  */

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def4]
elfutils-0.191-build/elfutils-0.191/src/ranlib.c: scope_hint: In function ‘handle_file’
elfutils-0.191-build/elfutils-0.191/src/ranlib.c:233:17: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘newfd’
elfutils-0.191-build/elfutils-0.191/config.h:218: included_from: Included from here.
elfutils-0.191-build/elfutils-0.191/src/ranlib.c:20: included_from: Included from here.
elfutils-0.191-build/elfutils-0.191/lib/eu-config.h:142:46: note: in definition of macro ‘unlikely’
elfutils-0.191-build/elfutils-0.191/src/ranlib.c:25: included_from: Included from here.
#  231|   	      unlink (tmpfname);
#  232|   	      if (newfd != -1)
#  233|-> 		close (newfd);
#  234|   	      goto nonew;
#  235|   	    }

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
diffbase-analyzer-version-clippy1.82.0
diffbase-analyzer-version-cppcheck2.16.0
diffbase-analyzer-version-gcc14.2.1
diffbase-analyzer-version-gcc-analyzer15.0.0
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-134.us-west-2.compute.internal
diffbase-mock-configfedora-rawhide-gcc-latest-x86_64
diffbase-project-nameelfutils-0.192-3.fc42
diffbase-store-results-to/tmp/tmpw_4rbio2/elfutils-0.192-3.fc42.tar.xz
diffbase-time-created2024-11-12 23:47:37
diffbase-time-finished2024-11-12 23:52:21
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpw_4rbio2/elfutils-0.192-3.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpw_4rbio2/elfutils-0.192-3.fc42.src.rpm'
diffbase-tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-134.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-nameelfutils-0.191-8.fc41
store-results-to/tmp/tmpoqr3nr3f/elfutils-0.191-8.fc41.tar.xz
time-created2024-11-12 23:42:29
time-finished2024-11-12 23:47:26
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpoqr3nr3f/elfutils-0.191-8.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpoqr3nr3f/elfutils-0.191-8.fc41.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9