dnf5-5.2.13.1-1.fc43

List of Findings

Error: CPPCHECK_WARNING (CWE-825): [#def1]
dnf5-5.2.13.1/dnf5/commands/history/transaction_id.cpp:96: error[derefInvalidIterator]: Dereference of an invalid iterator: trans_id_cache.end()
#   94|               if (id_range.first < 0) {
#   95|                   if (static_cast<uint64_t>(std::abs(id_range.first)) <= trans_id_cache.size()) {
#   96|->                     id_range.first = trans_id_cache.end()[static_cast<trans_id_cache_it_type>(id_range.first)];
#   97|                   } else {
#   98|                       // X in last-X goes out of range; we start with ID 0 if

Error: CPPCHECK_WARNING (CWE-825): [#def2]
dnf5-5.2.13.1/dnf5/commands/history/transaction_id.cpp:107: error[derefInvalidIterator]: Dereference of an invalid iterator: trans_id_cache.end()
#  105|               if (id_range.second < 0) {
#  106|                   if (static_cast<uint64_t>(std::abs(id_range.second)) <= trans_id_cache.size()) {
#  107|->                     id_range.second = trans_id_cache.end()[static_cast<trans_id_cache_it_type>(id_range.second)];
#  108|                   } else {
#  109|                       // X in last-X goes out of range for a range upper

Error: CPPCHECK_WARNING (CWE-758): [#def3]
dnf5-5.2.13.1/dnf5daemon-server/transaction.cpp:31: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement
#   29|   
#   30|   RpmTransactionItemActions transaction_package_to_action(const libdnf5::base::TransactionPackage & tspkg) {
#   31|->     switch (tspkg.get_action()) {
#   32|           case libdnf5::base::TransactionPackage::Action::INSTALL:
#   33|               return RpmTransactionItemActions::INSTALL;

Error: CPPCHECK_WARNING (CWE-562): [#def4]
dnf5-5.2.13.1/libdnf5-cli/argument_parser.cpp:1393: error[returnDanglingLifetime]: Returning object that points to local variable 'arg' that will be invalid when returning.
# 1391|       auto * ptr = arg.get();
# 1392|       p_impl->cmds.push_back(std::move(arg));
# 1393|->     return ptr;
# 1394|   }
# 1395|   

Error: CPPCHECK_WARNING (CWE-562): [#def5]
dnf5-5.2.13.1/libdnf5-cli/argument_parser.cpp:1401: error[returnDanglingLifetime]: Returning object that points to local variable 'arg' that will be invalid when returning.
# 1399|       auto * ptr = arg.get();
# 1400|       p_impl->cmds.push_back(std::move(arg));
# 1401|->     return ptr;
# 1402|   }
# 1403|   

Error: CPPCHECK_WARNING (CWE-562): [#def6]
dnf5-5.2.13.1/libdnf5-cli/argument_parser.cpp:1408: error[returnDanglingLifetime]: Returning object that points to local variable 'arg' that will be invalid when returning.
# 1406|       auto * ptr = arg.get();
# 1407|       p_impl->named_args.push_back(std::move(arg));
# 1408|->     return ptr;
# 1409|   }
# 1410|   

Error: CPPCHECK_WARNING (CWE-562): [#def7]
dnf5-5.2.13.1/libdnf5-cli/argument_parser.cpp:1416: error[returnDanglingLifetime]: Returning object that points to local variable 'arg' that will be invalid when returning.
# 1414|       auto * ptr = arg.get();
# 1415|       p_impl->pos_args.push_back(std::move(arg));
# 1416|->     return ptr;
# 1417|   }
# 1418|   

Error: CPPCHECK_WARNING (CWE-562): [#def8]
dnf5-5.2.13.1/libdnf5-cli/argument_parser.cpp:1427: error[returnDanglingLifetime]: Returning object that points to local variable 'arg' that will be invalid when returning.
# 1425|       auto * ptr = arg.get();
# 1426|       p_impl->pos_args.push_back(std::move(arg));
# 1427|->     return ptr;
# 1428|   }
# 1429|   

Error: CPPCHECK_WARNING (CWE-562): [#def9]
dnf5-5.2.13.1/libdnf5-cli/argument_parser.cpp:1434: error[returnDanglingLifetime]: Returning object that points to local variable 'group' that will be invalid when returning.
# 1432|       auto * ptr = group.get();
# 1433|       p_impl->groups.push_back(std::move(group));
# 1434|->     return ptr;
# 1435|   }
# 1436|   

Error: CPPCHECK_WARNING (CWE-758): [#def10]
dnf5-5.2.13.1/libdnf5-cli/argument_parser.cpp:1531: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement
# 1529|       if constexpr (std::is_same<Arg, ArgumentParser::PositionalArg>::value) {
# 1530|           return command.get_positional_args();
# 1531|->     }
# 1532|   }
# 1533|   

Error: CPPCHECK_WARNING (CWE-909): [#def11]
dnf5-5.2.13.1/libdnf5/base/goal.cpp:2908: error[uninitStructMember]: Uninitialized struct member: group_replay.package_types
# 2906|               }
# 2907|   
# 2908|->             replay.groups.push_back(group_replay);
# 2909|           }
# 2910|   

Error: CPPCHECK_WARNING (CWE-457): [#def12]
dnf5-5.2.13.1/libdnf5/base/goal.cpp:2908: error[uninitvar]: Uninitialized variable: group_replay.package_types
# 2906|               }
# 2907|   
# 2908|->             replay.groups.push_back(group_replay);
# 2909|           }
# 2910|   

Error: CPPCHECK_WARNING (CWE-562): [#def13]
dnf5-5.2.13.1/libdnf5/repo/repo_sack.cpp:167: error[danglingLifetime]: Non-local variable 'p_impl->cmdline_repo' will use pointer to local variable 'repo'.
#  165|           std::unique_ptr<Repo> repo(new Repo(p_impl->base, CMDLINE_REPO_NAME, Repo::Type::COMMANDLINE));
#  166|           repo->get_config().get_build_cache_option().set(libdnf5::Option::Priority::RUNTIME, false);
#  167|->         p_impl->cmdline_repo = repo.get();
#  168|           add_item(std::move(repo));
#  169|       }

Error: CPPCHECK_WARNING (CWE-562): [#def14]
dnf5-5.2.13.1/libdnf5/repo/repo_sack.cpp:310: error[danglingLifetime]: Non-local variable 'p_impl->system_repo' will use pointer to local variable 'repo'.
#  308|           // TODO(mblaha): re-enable caching once we can reliably detect whether system repo is up-to-date
#  309|           repo->get_config().get_build_cache_option().set(libdnf5::Option::Priority::RUNTIME, false);
#  310|->         p_impl->system_repo = repo.get();
#  311|           add_item(std::move(repo));
#  312|       }

Error: CPPCHECK_WARNING (CWE-909): [#def15]
dnf5-5.2.13.1/libdnf5/system/state.cpp:135: error[uninitStructMember]: Uninitialized struct member: group_state.package_types
#  133|           }
#  134|   
#  135|->         return group_state;
#  136|       }
#  137|   };

Error: CPPCHECK_WARNING (CWE-457): [#def16]
dnf5-5.2.13.1/libdnf5/system/state.cpp:135: warning[uninitvar]: Uninitialized variable: group_state.package_types
#  133|           }
#  134|   
#  135|->         return group_state;
#  136|       }
#  137|   };

Error: CPPCHECK_WARNING (CWE-457): [#def17]
dnf5-5.2.13.1/libdnf5/utils/fs/file.cpp:248: error[legacyUninitvar]: Uninitialized variable: length_to_end
#  246|       if (length_detected) {
#  247|           // The file length is known. Allocate memory at once and read data.
#  248|->         std::size_t to_read = count == 0 ? length_to_end : std::min(length_to_end, count);
#  249|           res.resize(to_read);
#  250|           std::size_t size = read(res.data(), to_read);

Error: CPPCHECK_WARNING (CWE-398): [#def18]
dnf5-5.2.13.1/libdnf5/utils/sqlite3/sqlite3.hpp:328: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
#  326|       explicit SQLite3(const std::string & db_path) : path{db_path}, db{nullptr} { open(); }
#  327|   
#  328|->     ~SQLite3() { close(); }
#  329|   
#  330|       const std::string & get_path() const { return path; }

Error: CPPCHECK_WARNING (CWE-476): [#def19]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_advisory.dir/advisoryPERL_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-476): [#def20]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_common.dir/commonPERL_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-476): [#def21]
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-476): [#def22]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_logger.dir/loggerPERL_wrap.cxx:1360: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mg->mg_virtual
# 1358|     mg = mg_find(sv,'U');
# 1359|     mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
# 1360|->   mg->mg_virtual->svt_get = (SwigMagicFunc) get;
# 1361|     mg->mg_virtual->svt_set = (SwigMagicFunc) set;
# 1362|     mg->mg_virtual->svt_len = 0;

Error: CPPCHECK_WARNING (CWE-398): [#def23]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_logger.dir/loggerPERL_wrap.cxx:2554: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 2552|       FREETMPS;
# 2553|       LEAVE;
# 2554|->     Swig::DirectorMethodException::raise(ERRSV);
# 2555|     }
# 2556|     PUTBACK;

Error: CPPCHECK_WARNING (CWE-398): [#def24]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_logger.dir/loggerPERL_wrap.cxx:2590: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 2588|       FREETMPS;
# 2589|       LEAVE;
# 2590|->     Swig::DirectorMethodException::raise(ERRSV);
# 2591|     }
# 2592|     PUTBACK;

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

Error: CPPCHECK_WARNING (CWE-398): [#def26]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_plugin.dir/pluginPERL_wrap.cxx:2373: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 2371|       FREETMPS;
# 2372|       LEAVE;
# 2373|->     Swig::DirectorMethodException::raise(ERRSV);
# 2374|     }
# 2375|     SPAGAIN;

Error: CPPCHECK_WARNING (CWE-398): [#def27]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_plugin.dir/pluginPERL_wrap.cxx:2410: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 2408|       FREETMPS;
# 2409|       LEAVE;
# 2410|->     Swig::DirectorMethodException::raise(ERRSV);
# 2411|     }
# 2412|     SPAGAIN;

Error: CPPCHECK_WARNING (CWE-398): [#def28]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_plugin.dir/pluginPERL_wrap.cxx:2449: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 2447|       FREETMPS;
# 2448|       LEAVE;
# 2449|->     Swig::DirectorMethodException::raise(ERRSV);
# 2450|     }
# 2451|     SPAGAIN;

Error: CPPCHECK_WARNING (CWE-398): [#def29]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_plugin.dir/pluginPERL_wrap.cxx:2486: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 2484|       FREETMPS;
# 2485|       LEAVE;
# 2486|->     Swig::DirectorMethodException::raise(ERRSV);
# 2487|     }
# 2488|     SPAGAIN;

Error: CPPCHECK_WARNING (CWE-398): [#def30]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_plugin.dir/pluginPERL_wrap.cxx:2527: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 2525|       FREETMPS;
# 2526|       LEAVE;
# 2527|->     Swig::DirectorMethodException::raise(ERRSV);
# 2528|     }
# 2529|     SPAGAIN;

Error: CPPCHECK_WARNING (CWE-398): [#def31]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_plugin.dir/pluginPERL_wrap.cxx:2811: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 2809|       FREETMPS;
# 2810|       LEAVE;
# 2811|->     Swig::DirectorMethodException::raise(ERRSV);
# 2812|     }
# 2813|     PUTBACK;

Error: CPPCHECK_WARNING (CWE-476): [#def32]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_transaction.dir/transactionPERL_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-476): [#def33]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5/CMakeFiles/perl5_utils.dir/utilsPERL_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-476): [#def34]
dnf5-5.2.13.1/redhat-linux-build/bindings/perl5/libdnf5_cli/CMakeFiles/perl5_progressbar.dir/progressbarPERL_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-476): [#def35]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_advisory.dir/advisoryRUBY_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): [#def36]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_advisory.dir/advisoryRUBY_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): [#def37]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_advisory.dir/advisoryRUBY_wrap.cxx:2586: error[uninitvar]: Uninitialized variable: v
# 2584|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2585|           return SWIG_OverflowError;
# 2586|->       if (val) *val = v;
# 2587|         return SWIG_OK;
# 2588|       }

Error: CPPCHECK_WARNING (CWE-457): [#def38]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_advisory.dir/advisoryRUBY_wrap.cxx:2632: error[uninitvar]: Uninitialized variable: v
# 2630|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2631|           return SWIG_OverflowError;
# 2632|->       if (val) *val = v;
# 2633|         return SWIG_OK;
# 2634|       }

Error: CPPCHECK_WARNING (CWE-457): [#def39]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_advisory.dir/advisoryRUBY_wrap.cxx:2689: error[uninitvar]: Uninitialized variable: v
# 2687|       a[1] = (VALUE)(&v);
# 2688|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 2689|->       if (val) *val = v;
# 2690|         return SWIG_OK;
# 2691|       }

Error: CPPCHECK_WARNING (CWE-457): [#def40]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_advisory.dir/advisoryRUBY_wrap.cxx:2718: error[uninitvar]: Uninitialized variable: v
# 2716|       a[1] = (VALUE)(&v);
# 2717|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 2718|->       if (val) *val = v;
# 2719|         return SWIG_OK;
# 2720|       }

Error: CPPCHECK_WARNING (CWE-476): [#def41]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_common.dir/commonRUBY_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): [#def42]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_common.dir/commonRUBY_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): [#def43]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_common.dir/commonRUBY_wrap.cxx:2627: error[uninitvar]: Uninitialized variable: v
# 2625|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2626|           return SWIG_OverflowError;
# 2627|->       if (val) *val = v;
# 2628|         return SWIG_OK;
# 2629|       }

Error: CPPCHECK_WARNING (CWE-457): [#def44]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_common.dir/commonRUBY_wrap.cxx:2663: error[uninitvar]: Uninitialized variable: v
# 2661|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2662|           return SWIG_OverflowError;
# 2663|->       if (val) *val = v;
# 2664|         return SWIG_OK;
# 2665|       }

Error: CPPCHECK_WARNING (CWE-457): [#def45]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_common.dir/commonRUBY_wrap.cxx:2720: error[uninitvar]: Uninitialized variable: v
# 2718|       a[1] = (VALUE)(&v);
# 2719|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 2720|->       if (val) *val = v;
# 2721|         return SWIG_OK;
# 2722|       }

Error: CPPCHECK_WARNING (CWE-457): [#def46]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_common.dir/commonRUBY_wrap.cxx:2749: error[uninitvar]: Uninitialized variable: v
# 2747|       a[1] = (VALUE)(&v);
# 2748|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 2749|->       if (val) *val = v;
# 2750|         return SWIG_OK;
# 2751|       }

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

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

Error: CPPCHECK_WARNING (CWE-457): [#def49]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_comps.dir/compsRUBY_wrap.cxx:3027: error[uninitvar]: Uninitialized variable: v
# 3025|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 3026|           return SWIG_OverflowError;
# 3027|->       if (val) *val = v;
# 3028|         return SWIG_OK;
# 3029|       }

Error: CPPCHECK_WARNING (CWE-457): [#def50]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_comps.dir/compsRUBY_wrap.cxx:3073: error[uninitvar]: Uninitialized variable: v
# 3071|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 3072|           return SWIG_OverflowError;
# 3073|->       if (val) *val = v;
# 3074|         return SWIG_OK;
# 3075|       }

Error: CPPCHECK_WARNING (CWE-457): [#def51]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_comps.dir/compsRUBY_wrap.cxx:3130: error[uninitvar]: Uninitialized variable: v
# 3128|       a[1] = (VALUE)(&v);
# 3129|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 3130|->       if (val) *val = v;
# 3131|         return SWIG_OK;
# 3132|       }

Error: CPPCHECK_WARNING (CWE-457): [#def52]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_comps.dir/compsRUBY_wrap.cxx:3159: error[uninitvar]: Uninitialized variable: v
# 3157|       a[1] = (VALUE)(&v);
# 3158|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 3159|->       if (val) *val = v;
# 3160|         return SWIG_OK;
# 3161|       }

Error: CPPCHECK_WARNING (CWE-457): [#def53]
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): [#def54]
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): [#def55]
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): [#def56]
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): [#def57]
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): [#def58]
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): [#def59]
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): [#def60]
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): [#def61]
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): [#def62]
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): [#def63]
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|       }

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

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

Error: CPPCHECK_WARNING (CWE-457): [#def66]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_logger.dir/loggerRUBY_wrap.cxx:2478: error[uninitvar]: Uninitialized variable: v
# 2476|       a[1] = (VALUE)(&v);
# 2477|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 2478|->       if (val) *val = v;
# 2479|         return SWIG_OK;
# 2480|       }

Error: CPPCHECK_WARNING (CWE-457): [#def67]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_logger.dir/loggerRUBY_wrap.cxx:2660: error[uninitvar]: Uninitialized variable: v
# 2658|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2659|           return SWIG_OverflowError;
# 2660|->       if (val) *val = v;
# 2661|         return SWIG_OK;
# 2662|       }

Error: CPPCHECK_WARNING (CWE-457): [#def68]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_logger.dir/loggerRUBY_wrap.cxx:2691: error[uninitvar]: Uninitialized variable: v
# 2689|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2690|           return SWIG_OverflowError;
# 2691|->       if (val) *val = v;
# 2692|         return SWIG_OK;
# 2693|       }

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

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

Error: CPPCHECK_WARNING (CWE-457): [#def71]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_plugin.dir/pluginRUBY_wrap.cxx:2777: error[uninitvar]: Uninitialized variable: v
# 2775|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2776|           return SWIG_OverflowError;
# 2777|->       if (val) *val = v;
# 2778|         return SWIG_OK;
# 2779|       }

Error: CPPCHECK_WARNING (CWE-398): [#def72]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_plugin.dir/pluginRUBY_wrap.cxx:4675: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 4673|     swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_libdnf5__PluginAPIVersion,  0 );
# 4674|     if (!SWIG_IsOK(swig_res)) {
# 4675|->     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""libdnf5::PluginAPIVersion""'");
# 4676|     }
# 4677|     c_result = *(reinterpret_cast< libdnf5::PluginAPIVersion * >(swig_argp));

Error: CPPCHECK_WARNING (CWE-398): [#def73]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_plugin.dir/pluginRUBY_wrap.cxx:4692: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 4690|     res = SWIG_AsCharPtrAndSize(result, &buf, NULL, &alloc);
# 4691|     if (!SWIG_IsOK(res)) {
# 4692|->     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(res)), "in output value of type '""char const *""'");
# 4693|     }
# 4694|     if (alloc == SWIG_NEWOBJ) {

Error: CPPCHECK_WARNING (CWE-398): [#def74]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_plugin.dir/pluginRUBY_wrap.cxx:4711: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 4709|     swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_libdnf5__plugin__Version,  0 );
# 4710|     if (!SWIG_IsOK(swig_res)) {
# 4711|->     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""libdnf5::plugin::Version""'");
# 4712|     }
# 4713|     c_result = *(reinterpret_cast< libdnf5::plugin::Version * >(swig_argp));

Error: CPPCHECK_WARNING (CWE-398): [#def75]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_plugin.dir/pluginRUBY_wrap.cxx:4728: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 4726|     swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_p_char,  0  | SWIG_POINTER_DISOWN, &own);
# 4727|     if (!SWIG_IsOK(swig_res)) {
# 4728|->     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""char const *const *""'");
# 4729|     }
# 4730|     c_result = reinterpret_cast< char ** >(swig_argp);

Error: CPPCHECK_WARNING (CWE-398): [#def76]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_plugin.dir/pluginRUBY_wrap.cxx:4748: error[throwInNoexceptFunction]: Exception thrown in function declared not to throw exceptions.
# 4746|     res = SWIG_AsCharPtrAndSize(result, &buf, NULL, &alloc);
# 4747|     if (!SWIG_IsOK(res)) {
# 4748|->     Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(res)), "in output value of type '""char const *""'");
# 4749|     }
# 4750|     if (alloc == SWIG_NEWOBJ) {

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

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

Error: CPPCHECK_WARNING (CWE-457): [#def79]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_repo.dir/repoRUBY_wrap.cxx:3040: error[uninitvar]: Uninitialized variable: v
# 3038|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 3039|           return SWIG_OverflowError;
# 3040|->       if (val) *val = v;
# 3041|         return SWIG_OK;
# 3042|       }

Error: CPPCHECK_WARNING (CWE-457): [#def80]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_repo.dir/repoRUBY_wrap.cxx:3086: error[uninitvar]: Uninitialized variable: v
# 3084|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 3085|           return SWIG_OverflowError;
# 3086|->       if (val) *val = v;
# 3087|         return SWIG_OK;
# 3088|       }

Error: CPPCHECK_WARNING (CWE-457): [#def81]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_repo.dir/repoRUBY_wrap.cxx:3143: error[uninitvar]: Uninitialized variable: v
# 3141|       a[1] = (VALUE)(&v);
# 3142|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 3143|->       if (val) *val = v;
# 3144|         return SWIG_OK;
# 3145|       }

Error: CPPCHECK_WARNING (CWE-457): [#def82]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_repo.dir/repoRUBY_wrap.cxx:3172: error[uninitvar]: Uninitialized variable: v
# 3170|       a[1] = (VALUE)(&v);
# 3171|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 3172|->       if (val) *val = v;
# 3173|         return SWIG_OK;
# 3174|       }

Error: CPPCHECK_WARNING (CWE-457): [#def83]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_repo.dir/repoRUBY_wrap.cxx:3422: error[uninitvar]: Uninitialized variable: v
# 3420|       a[1] = (VALUE)(&v);
# 3421|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2DBL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 3422|->       if (val) *val = v;
# 3423|         return SWIG_OK;
# 3424|       }

Error: CPPCHECK_WARNING (CWE-476): [#def84]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_transaction.dir/transactionRUBY_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): [#def85]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_transaction.dir/transactionRUBY_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): [#def86]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_transaction.dir/transactionRUBY_wrap.cxx:2589: error[uninitvar]: Uninitialized variable: v
# 2587|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2588|           return SWIG_OverflowError;
# 2589|->       if (val) *val = v;
# 2590|         return SWIG_OK;
# 2591|       }

Error: CPPCHECK_WARNING (CWE-457): [#def87]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_transaction.dir/transactionRUBY_wrap.cxx:2635: error[uninitvar]: Uninitialized variable: v
# 2633|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2634|           return SWIG_OverflowError;
# 2635|->       if (val) *val = v;
# 2636|         return SWIG_OK;
# 2637|       }

Error: CPPCHECK_WARNING (CWE-457): [#def88]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_transaction.dir/transactionRUBY_wrap.cxx:2692: error[uninitvar]: Uninitialized variable: v
# 2690|       a[1] = (VALUE)(&v);
# 2691|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 2692|->       if (val) *val = v;
# 2693|         return SWIG_OK;
# 2694|       }

Error: CPPCHECK_WARNING (CWE-457): [#def89]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_transaction.dir/transactionRUBY_wrap.cxx:2721: error[uninitvar]: Uninitialized variable: v
# 2719|       a[1] = (VALUE)(&v);
# 2720|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 2721|->       if (val) *val = v;
# 2722|         return SWIG_OK;
# 2723|       }

Error: CPPCHECK_WARNING (CWE-476): [#def90]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_utils.dir/utilsRUBY_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): [#def91]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5/CMakeFiles/ruby_utils.dir/utilsRUBY_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-476): [#def92]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5_cli/CMakeFiles/ruby_progressbar.dir/progressbarRUBY_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): [#def93]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5_cli/CMakeFiles/ruby_progressbar.dir/progressbarRUBY_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): [#def94]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5_cli/CMakeFiles/ruby_progressbar.dir/progressbarRUBY_wrap.cxx:2048: error[uninitvar]: Uninitialized variable: v
# 2046|       a[1] = (VALUE)(&v);
# 2047|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 2048|->       if (val) *val = v;
# 2049|         return SWIG_OK;
# 2050|       }

Error: CPPCHECK_WARNING (CWE-457): [#def95]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5_cli/CMakeFiles/ruby_progressbar.dir/progressbarRUBY_wrap.cxx:2257: error[uninitvar]: Uninitialized variable: v
# 2255|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2256|           return SWIG_OverflowError;
# 2257|->       if (val) *val = v;
# 2258|         return SWIG_OK;
# 2259|       }

Error: CPPCHECK_WARNING (CWE-457): [#def96]
dnf5-5.2.13.1/redhat-linux-build/bindings/ruby/libdnf5_cli/CMakeFiles/ruby_progressbar.dir/progressbarRUBY_wrap.cxx:2288: error[uninitvar]: Uninitialized variable: v
# 2286|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2287|           return SWIG_OverflowError;
# 2288|->       if (val) *val = v;
# 2289|         return SWIG_OK;
# 2290|       }

Error: CPPCHECK_WARNING (CWE-416): [#def97]
dnf5-5.2.13.1/test/libdnf5-cli/output/test_repoquery.cpp:52: error[deallocuse]: Dereferencing 'stream' after it is deallocated / released
#   50|   
#   51|       ~MemStream() {
#   52|->         CPPUNIT_ASSERT_EQUAL(fclose(stream), 0);
#   53|           free(buf);
#   54|       }

Error: CPPCHECK_WARNING (CWE-416): [#def98]
dnf5-5.2.13.1/test/libdnf5/utils/test_fs.cpp:394: error[deallocuse]: Dereferencing 'file_p' after it is deallocated / released
#  392|       CPPUNIT_ASSERT_EQUAL((size_t)10, res);  // in theory, the read() could read less and this would fail
#  393|       CPPUNIT_ASSERT_EQUAL(data_w, std::string(data_r, sizeof(data_r)));
#  394|->     CPPUNIT_ASSERT_EQUAL(0, std::fclose(file_p));
#  395|   }
#  396|   

Error: CPPCHECK_WARNING (CWE-398): [#def99]
dnf5-5.2.13.1/test/shared/base_test_case.cpp:112: warning[containerOutOfBounds]: Either the condition 'found.empty()' is redundant or expression 'found.begin()' causes access out of bounds.
#  110|       }
#  111|   
#  112|->     return *found.begin();
#  113|   }
#  114|   

Error: CPPCHECK_WARNING (CWE-398): [#def100]
dnf5-5.2.13.1/test/shared/base_test_case.cpp:133: warning[containerOutOfBounds]: Either the condition 'found.empty()' is redundant or expression 'found.begin()' causes access out of bounds.
#  131|       }
#  132|   
#  133|->     return *found.begin();
#  134|   }
#  135|   

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-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
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