diff --git a/NEWS b/NEWS index 2eb1e20d..084780a3 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ xbps-0.36 (???): + * xbps-query(8): fix a segfault with '-vL' for local unsigned repositories. + * xbps-create(8): new option --compression to specify a compression format; defaults to xz. diff --git a/bin/xbps-query/list.c b/bin/xbps-query/list.c index 3efd0cc2..5ad38468 100644 --- a/bin/xbps-query/list.c +++ b/bin/xbps-query/list.c @@ -156,8 +156,8 @@ list_pkgs_pkgdb(struct xbps_handle *xhp) static int repo_list_uri_cb(struct xbps_repo *repo, void *arg _unused, bool *done _unused) { - const char *signedby, *hexfp; - uint16_t pubkeysize; + const char *signedby = NULL, *hexfp = NULL; + uint16_t pubkeysize = 0; printf("%5zd %s", repo->idx ? (ssize_t)xbps_dictionary_count(repo->idx) : -1, @@ -169,8 +169,8 @@ repo_list_uri_cb(struct xbps_repo *repo, void *arg _unused, bool *done _unused) xbps_dictionary_get_cstring_nocopy(repo->idxmeta, "signature-by", &signedby); xbps_dictionary_get_uint16(repo->idxmeta, "public-key-size", &pubkeysize); pubkey = xbps_dictionary_get(repo->idxmeta, "public-key"); - hexfp = xbps_pubkey2fp(repo->xhp, pubkey); - + if (pubkey) + hexfp = xbps_pubkey2fp(repo->xhp, pubkey); if (signedby) printf(" Signed-by: %s\n", signedby); if (pubkeysize && hexfp)