Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libbpf-1.4.6-build/libbpf-1.4.6/include/linux/err.h:15:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
libbpf-1.4.6-build/libbpf-1.4.6/src/btf.c: scope_hint: In function ‘btf_new’
#   13|   static inline void * ERR_PTR(long error_)
#   14|   {
#   15|-> 	return (void *) error_;
#   16|   }
#   17|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libbpf-1.4.6-build/libbpf-1.4.6/include/linux/err.h:15:16: warning[-Wanalyzer-malloc-leak]: leak of ‘btf’
libbpf-1.4.6-build/libbpf-1.4.6/src/btf.c: scope_hint: In function ‘btf_new’
#   13|   static inline void * ERR_PTR(long error_)
#   14|   {
#   15|-> 	return (void *) error_;
#   16|   }
#   17|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
libbpf-1.4.6-build/libbpf-1.4.6/src/btf.c: scope_hint: In function ‘btf__str_by_offset’
libbpf-1.4.6-build/libbpf-1.4.6/src/btf.c:1501:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘btf’
libbpf-1.4.6-build/libbpf-1.4.6/src/btf.c: scope_hint: In function ‘btf__str_by_offset’
libbpf-1.4.6-build/libbpf-1.4.6/src/btf.c: scope_hint: In function ‘btf__str_by_offset’
libbpf-1.4.6-build/libbpf-1.4.6/src/btf.c: scope_hint: In function ‘btf__str_by_offset’
# 1499|   const char *btf__str_by_offset(const struct btf *btf, __u32 offset)
# 1500|   {
# 1501|-> 	if (offset < btf->start_str_off)
# 1502|   		return btf__str_by_offset(btf->base_btf, offset);
# 1503|   	else if (offset - btf->start_str_off < btf->hdr->str_len)

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-namelibbpf-1.5.0-1.fc42
diffbase-store-results-to/tmp/tmpg8468kpt/libbpf-1.5.0-1.fc42.tar.xz
diffbase-time-created2024-11-13 01:17:58
diffbase-time-finished2024-11-13 01:20:07
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpg8468kpt/libbpf-1.5.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpg8468kpt/libbpf-1.5.0-1.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-namelibbpf-1.4.6-1.fc41
store-results-to/tmp/tmp3n8bhbxc/libbpf-1.4.6-1.fc41.tar.xz
time-created2024-11-13 01:15:34
time-finished2024-11-13 01:17:46
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp3n8bhbxc/libbpf-1.4.6-1.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp3n8bhbxc/libbpf-1.4.6-1.fc41.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9