Fixed findings

List of Findings

Error: COMPILER_WARNING: [#def1]
binutils-2.43.1-build/binutils-2.43.1/libctf/ctf-hash.c: scope_hint: In function ‘ctf_dynhash_create_sized’
binutils-2.43.1-build/binutils-2.43.1/libctf/ctf-hash.c:167:13: warning[-Walloc-size]: allocation of insufficient size ‘8’ for type ‘ctf_dynhash_t’ {aka ‘struct ctf_dynhash’} with size ‘24’
#  167 |     dynhash = malloc (offsetof (ctf_dynhash_t, key_free));
#      |             ^
#  165|       dynhash = malloc (sizeof (ctf_dynhash_t));
#  166|     else
#  167|->     dynhash = malloc (offsetof (ctf_dynhash_t, key_free));
#  168|     if (!dynhash)
#  169|       return NULL;

Error: GCC_ANALYZER_WARNING (CWE-131): [#def2]
binutils-2.43.1-build/binutils-2.43.1/libctf/ctf-hash.c: scope_hint: In function ‘ctf_dynhash_create_sized’
binutils-2.43.1-build/binutils-2.43.1/libctf/ctf-hash.c:167:15: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#  165|       dynhash = malloc (sizeof (ctf_dynhash_t));
#  166|     else
#  167|->     dynhash = malloc (offsetof (ctf_dynhash_t, key_free));
#  168|     if (!dynhash)
#  169|       return NULL;

Error: COMPILER_WARNING: [#def3]
binutils-2.43.1-build/binutils-2.43.1/libctf/ctf-hash.c: scope_hint: In function ‘ctf_hashtab_insert’
binutils-2.43.1-build/binutils-2.43.1/libctf/ctf-hash.c:228:15: warning[-Walloc-size]: allocation of insufficient size ‘16’ for type ‘ctf_helem_t’ {aka ‘struct ctf_helem’} with size ‘24’
#  228 |         *slot = malloc (offsetof (ctf_helem_t, owner));
#      |               ^
#  226|   	*slot = malloc (sizeof (ctf_helem_t));
#  227|         else
#  228|-> 	*slot = malloc (offsetof (ctf_helem_t, owner));
#  229|         if (!*slot)
#  230|   	return NULL;

Error: GCC_ANALYZER_WARNING (CWE-131): [#def4]
binutils-2.43.1-build/binutils-2.43.1/libctf/ctf-hash.c: scope_hint: In function ‘ctf_hashtab_insert’
binutils-2.43.1-build/binutils-2.43.1/libctf/ctf-hash.c:228:15: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
#  226|   	*slot = malloc (sizeof (ctf_helem_t));
#  227|         else
#  228|-> 	*slot = malloc (offsetof (ctf_helem_t, owner));
#  229|         if (!*slot)
#  230|   	return NULL;

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-102.us-west-2.compute.internal
diffbase-mock-configfedora-rawhide-gcc-latest-x86_64
diffbase-project-namebinutils-2.43.50-5.fc42
diffbase-store-results-to/tmp/tmp5wfj0cex/binutils-2.43.50-5.fc42.tar.xz
diffbase-time-created2024-11-12 23:25:57
diffbase-time-finished2024-11-12 23:40:33
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp5wfj0cex/binutils-2.43.50-5.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp5wfj0cex/binutils-2.43.50-5.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-102.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namebinutils-2.43.1-2.fc41
store-results-to/tmp/tmp68f7t1zm/binutils-2.43.1-2.fc41.tar.xz
time-created2024-11-12 23:10:50
time-finished2024-11-12 23:25:35
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp68f7t1zm/binutils-2.43.1-2.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp68f7t1zm/binutils-2.43.1-2.fc41.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9