libsolv/SOURCES/libsolv-0.7.24-static_analysis_fixes.patch

35 lines
1.4 KiB
Diff

diff -up libsolv-0.7.24/ext/repo_rpmmd.c.orig libsolv-0.7.24/ext/repo_rpmmd.c
--- libsolv-0.7.24/ext/repo_rpmmd.c.orig 2023-04-13 10:10:14.000000000 -0400
+++ libsolv-0.7.24/ext/repo_rpmmd.c 2024-04-08 14:00:05.923253315 -0400
@@ -609,6 +609,8 @@ fill_cshash_from_new_solvables(struct pa
KeyValue kv;
Repokey *key;
+ memset(&kv, 0, sizeof(kv));
+
for (i = pd->first; i < pool->nsolvables; i++)
{
if (pool->solvables[i].repo != pd->repo)
diff -up libsolv-0.7.24/ext/repo_susetags.c.orig libsolv-0.7.24/ext/repo_susetags.c
--- libsolv-0.7.24/ext/repo_susetags.c.orig 2023-04-13 10:10:14.000000000 -0400
+++ libsolv-0.7.24/ext/repo_susetags.c 2024-04-08 14:00:50.560276418 -0400
@@ -339,6 +339,7 @@ lookup_shared_id(Repodata *data, Id p, I
if (uninternalized)
{
KeyValue kv;
+ memset(&kv, 0, sizeof(kv));
Repokey *key = repodata_lookup_kv_uninternalized(data, p, keyname, &kv);
if (!key)
return 0;
diff -up libsolv-0.7.24/ext/testcase.c.orig libsolv-0.7.24/ext/testcase.c
--- libsolv-0.7.24/ext/testcase.c.orig 2023-04-13 10:10:14.000000000 -0400
+++ libsolv-0.7.24/ext/testcase.c 2024-04-08 14:12:49.660462318 -0400
@@ -1497,6 +1497,7 @@ testcase_solverresult(Solver *solv, int
if ((resultflags & TESTCASE_RESULT_USERINSTALLED) != 0)
{
Queue q;
+ queue_init(&q);
solver_get_userinstalled(solv, &q, 0);
for (i = 0; i < q.count; i++)
{