Newly introduced findings

List of Findings

Error: CPPCHECK_WARNING (CWE-476): [#def1]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_exception.dir/exceptionPERL_wrap.cxx:1359: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mg->mg_virtual
# 1357|     mg = mg_find(sv,'U');
# 1358|     mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
# 1359|->   mg->mg_virtual->svt_get = (SwigMagicFunc) get;
# 1360|     mg->mg_virtual->svt_set = (SwigMagicFunc) set;
# 1361|     mg->mg_virtual->svt_len = 0;

Error: CPPCHECK_WARNING (CWE-457): [#def2]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_comps.dir/compsRUBY_wrap.cxx:13607: error[legacyUninitvar]: Uninitialized variable: arg2
#13605|     arg3 = static_cast< bool >(val3);
#13606|     try {
#13607|->     result = (libdnf5::comps::GroupQuery *)new libdnf5::comps::GroupQuery((libdnf5::BaseWeakPtr const &)*arg1,SWIG_STD_MOVE(arg2),arg3);
#13608|       DATA_PTR(self) = result;
#13609|     } catch(libdnf5::UserAssertionError &_e) {

Error: CPPCHECK_WARNING (CWE-457): [#def3]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_comps.dir/compsRUBY_wrap.cxx:13658: error[legacyUninitvar]: Uninitialized variable: arg2
#13656|     }
#13657|     try {
#13658|->     result = (libdnf5::comps::GroupQuery *)new libdnf5::comps::GroupQuery((libdnf5::BaseWeakPtr const &)*arg1,SWIG_STD_MOVE(arg2));
#13659|       DATA_PTR(self) = result;
#13660|     } catch(libdnf5::UserAssertionError &_e) {

Error: CPPCHECK_WARNING (CWE-457): [#def4]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_comps.dir/compsRUBY_wrap.cxx:13717: error[legacyUninitvar]: Uninitialized variable: arg2
#13715|     arg3 = static_cast< bool >(val3);
#13716|     try {
#13717|->     result = (libdnf5::comps::GroupQuery *)new libdnf5::comps::GroupQuery(*arg1,SWIG_STD_MOVE(arg2),arg3);
#13718|       DATA_PTR(self) = result;
#13719|     } catch(libdnf5::UserAssertionError &_e) {

Error: CPPCHECK_WARNING (CWE-457): [#def5]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_comps.dir/compsRUBY_wrap.cxx:13768: error[legacyUninitvar]: Uninitialized variable: arg2
#13766|     }
#13767|     try {
#13768|->     result = (libdnf5::comps::GroupQuery *)new libdnf5::comps::GroupQuery(*arg1,SWIG_STD_MOVE(arg2));
#13769|       DATA_PTR(self) = result;
#13770|     } catch(libdnf5::UserAssertionError &_e) {

Error: CPPCHECK_WARNING (CWE-457): [#def6]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_comps.dir/compsRUBY_wrap.cxx:18663: error[legacyUninitvar]: Uninitialized variable: arg2
#18661|     arg3 = static_cast< bool >(val3);
#18662|     try {
#18663|->     result = (libdnf5::comps::EnvironmentQuery *)new libdnf5::comps::EnvironmentQuery((libdnf5::BaseWeakPtr const &)*arg1,SWIG_STD_MOVE(arg2),arg3);
#18664|       DATA_PTR(self) = result;
#18665|     } catch(libdnf5::UserAssertionError &_e) {

Error: CPPCHECK_WARNING (CWE-457): [#def7]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_comps.dir/compsRUBY_wrap.cxx:18714: error[legacyUninitvar]: Uninitialized variable: arg2
#18712|     }
#18713|     try {
#18714|->     result = (libdnf5::comps::EnvironmentQuery *)new libdnf5::comps::EnvironmentQuery((libdnf5::BaseWeakPtr const &)*arg1,SWIG_STD_MOVE(arg2));
#18715|       DATA_PTR(self) = result;
#18716|     } catch(libdnf5::UserAssertionError &_e) {

Error: CPPCHECK_WARNING (CWE-457): [#def8]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_comps.dir/compsRUBY_wrap.cxx:18773: error[legacyUninitvar]: Uninitialized variable: arg2
#18771|     arg3 = static_cast< bool >(val3);
#18772|     try {
#18773|->     result = (libdnf5::comps::EnvironmentQuery *)new libdnf5::comps::EnvironmentQuery(*arg1,SWIG_STD_MOVE(arg2),arg3);
#18774|       DATA_PTR(self) = result;
#18775|     } catch(libdnf5::UserAssertionError &_e) {

Error: CPPCHECK_WARNING (CWE-457): [#def9]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_comps.dir/compsRUBY_wrap.cxx:18824: error[legacyUninitvar]: Uninitialized variable: arg2
#18822|     }
#18823|     try {
#18824|->     result = (libdnf5::comps::EnvironmentQuery *)new libdnf5::comps::EnvironmentQuery(*arg1,SWIG_STD_MOVE(arg2));
#18825|       DATA_PTR(self) = result;
#18826|     } catch(libdnf5::UserAssertionError &_e) {

Error: CPPCHECK_WARNING (CWE-476): [#def10]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_exception.dir/exceptionRUBY_wrap.cxx:1565: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: klass_name
# 1563|     size_t klass_len = 4 + strlen(type->name) + 1;
# 1564|     char *klass_name = (char *) malloc(klass_len);
# 1565|->   SWIG_snprintf(klass_name, klass_len, "TYPE%s", type->name);
# 1566|     if (NIL_P(_cSWIG_Pointer)) {
# 1567|       _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);

Error: CPPCHECK_WARNING (CWE-476): [#def11]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_exception.dir/exceptionRUBY_wrap.cxx:1623: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: klass_name
# 1621|       size_t klass_len = 4 + strlen(type->name) + 1;
# 1622|       klass_name = (char *) malloc(klass_len);
# 1623|->     SWIG_snprintf(klass_name, klass_len, "TYPE%s", type->name);
# 1624|       klass = rb_const_get(_mSWIG, rb_intern(klass_name));
# 1625|       free((void *) klass_name);

Error: CPPCHECK_WARNING (CWE-457): [#def12]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_exception.dir/exceptionRUBY_wrap.cxx:2116: error[uninitvar]: Uninitialized variable: v
# 2114|       a[1] = (VALUE)(&v);
# 2115|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 2116|->       if (val) *val = v;
# 2117|         return SWIG_OK;
# 2118|       }

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
diffbase-analyzer-version-clippy1.86.0
diffbase-analyzer-version-cppcheck2.17.1
diffbase-analyzer-version-gcc15.0.1
diffbase-analyzer-version-gcc-analyzer15.0.1
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-83.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namednf5-5.2.12.0-1.fc42
diffbase-store-results-to/tmp/tmpk_62p9f5/dnf5-5.2.12.0-1.fc42.tar.xz
diffbase-time-created2025-04-25 12:20:34
diffbase-time-finished2025-04-25 12:33:46
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpk_62p9f5/dnf5-5.2.12.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpk_62p9f5/dnf5-5.2.12.0-1.fc42.src.rpm'
diffbase-tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-83.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-namednf5-5.2.13.1-1.fc43
store-results-to/tmp/tmpg89moatn/dnf5-5.2.13.1-1.fc43.tar.xz
time-created2025-04-25 12:34:00
time-finished2025-04-25 12:47:58
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpg89moatn/dnf5-5.2.13.1-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpg89moatn/dnf5-5.2.13.1-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9