From ef67b5605479ae1c94554336a0fd518f131b32b3 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 25 Nov 2013 11:27:11 +0100 Subject: [PATCH] xbps-rindex: clean: ignore invalid entries from index-files. --- bin/xbps-rindex/index-clean.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/xbps-rindex/index-clean.c b/bin/xbps-rindex/index-clean.c index a11e6284..778f26ec 100644 --- a/bin/xbps-rindex/index-clean.c +++ b/bin/xbps-rindex/index-clean.c @@ -91,8 +91,10 @@ idxfiles_cleaner_cb(struct xbps_handle *xhp _unused, xbps_object_t obj _unused, const char *pkgver; /* Find out entries on index-files that aren't registered on index */ - pkgname = xbps_pkg_name(key); - assert(pkgname); + if ((pkgname = xbps_pkg_name(key)) == NULL) { + xbps_dbg_printf(xhp, "%s: invalid entry found on index-files: %s\n", cbd->repourl, key); + return 0; + } if ((pkg = xbps_dictionary_get(cbd->idx, pkgname))) { xbps_dictionary_get_cstring_nocopy(pkg, "pkgver", &pkgver); if (strcmp(pkgver, key))