From: niner Date: Tue, 8 Feb 2022 17:10:54 +0000 (+0100) Subject: Fix segfault on conflict resolution when using bindings X-Git-Tag: 0.7.21~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F488%2Fhead;p=thirdparty%2Flibsolv.git Fix segfault on conflict resolution when using bindings 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. --- diff --git a/bindings/solv.i b/bindings/solv.i index 3a6bac46..1d35bf61 100644 --- a/bindings/solv.i +++ b/bindings/solv.i @@ -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;