]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Fix segfault on conflict resolution when using bindings
authorniner <nine@detonation.org>
Tue, 8 Feb 2022 17:10:54 +0000 (18:10 +0100)
committerMichael Schroeder <mls@suse.de>
Fri, 4 Mar 2022 10:48:22 +0000 (11:48 +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 a53610f7bdb739cb1806a1a73cd75cca8daa9ce7..0fd798c298b76c47468e0269bc22faa13cb8a150 100644 (file)
@@ -3242,7 +3242,7 @@ rb_eval_string(
     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;