bin/xbps-rindex/sign.c: CID 62699 (dereference NULL return value)

This commit is contained in:
Juan RP 2014-10-05 13:20:18 +02:00
parent be256ed77b
commit b96d1c9f4e

View File

@ -177,6 +177,8 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
* packages in this repository.
*/
iter = xbps_dictionary_iterator(repo->idx);
assert(iter);
while ((obj = xbps_object_iterator_next(iter))) {
pkgd = xbps_dictionary_get_keysym(repo->idx, obj);
xbps_dictionary_get_cstring_nocopy(pkgd, "architecture", &arch);