]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Fix segfault on conflict resolution when using bindings 488/head
authorniner <nine@detonation.org>
Tue, 8 Feb 2022 17:10:54 +0000 (18:10 +0100)
committerGitHub <noreply@github.com>
Tue, 8 Feb 2022 17:10:54 +0000 (18:10 +0100)
Solutionelement objects were created with a wrong solutionid (i.e. the
solution element id was used for the solutionid field). This led to invalid
array indexes when trying to read the extraflags which then escalated
into a segfault. Fix by setting solutionid correctly in the Solutionelement
constructor.

bindings/solv.i

index 3a6bac468219fec83602612e5cc33ee423ab5878..1d35bf61b97df6e94e87b12e479e352b6242ca38 100644 (file)
@@ -3411,7 +3411,7 @@ returnself(matchsolvable)
     e = solv_calloc(1, sizeof(*e));
     e->solv = solv;
     e->problemid = problemid;
-    e->solutionid = id;
+    e->solutionid = solutionid;
     e->id = id;
     e->type = type;
     e->p = p;