From 8c2741a30885a770c6eef7a892d5f742ba0003de Mon Sep 17 00:00:00 2001 From: Jelle van der Waa <jelle@archlinux.org> Date: Tue, 15 Jun 2021 20:00:06 +0200 Subject: [PATCH] Fix find_grp_pkgs segfault Use alpmlist_to_pylist2 to pass NULL to the package function to prevent arbitrary memory to be passed to Py_INCREF. Closes: FS#71261 --- src/db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db.c b/src/db.c index 9b25768..226d195 100644 --- a/src/db.c +++ b/src/db.c @@ -331,7 +331,7 @@ PyObject* pyalpm_find_grp_pkgs(PyObject* self, PyObject *args) { return NULL; } pkg_list = alpm_find_group_pkgs(db_list, grpname); - result = alpmlist_to_pylist(pkg_list, pyalpm_package_from_pmpkg); + result = alpmlist_to_pylist2(pkg_list, pyalpm_package_from_pmpkg, NULL); alpm_list_free(db_list); alpm_list_free(pkg_list); return result; -- GitLab