summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormorganamilo <morganamilo@gmail.com>2019-10-15 11:30:01 +0200
committerAllan McRae <allan@archlinux.org>2019-10-15 11:56:00 +0200
commit54b6d689e5aaa56058e0c95223319221fa735821 (patch)
treee5d8cd3db990717cdd124603e9bed7493da6a5a0
parent27ccd6897640f3dab76624825504a7ae02ddda26 (diff)
downloadpacman-54b6d689e5aaa56058e0c95223319221fa735821.tar.gz
pacman-54b6d689e5aaa56058e0c95223319221fa735821.tar.xz
libalpm: fix segfault when -Qip'ing a package
The dummy checksigs function never sets count to 0, leaving it unitialized. This caused the siglist cleanup to try and free the empty list. Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--lib/libalpm/signing.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index 30d057a3..fc537dd3 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -800,8 +800,9 @@ int _alpm_key_import(alpm_handle_t UNUSED *handle, const char UNUSED *uid,
}
int _alpm_gpgme_checksig(alpm_handle_t UNUSED *handle, const char UNUSED *path,
- const char UNUSED *base64_sig, alpm_siglist_t UNUSED *siglist)
+ const char UNUSED *base64_sig, alpm_siglist_t *siglist)
{
+ siglist->count = 0;
return -1;
}
#endif /* HAVE_LIBGPGME */