bin/xbps-query/list.c: return error if pkgver or short_desc are NULL.

This commit is contained in:
Juan RP 2013-04-04 09:11:37 +02:00
parent 8736ef6c5a
commit ae254e9b06

View File

@ -66,7 +66,7 @@ list_pkgs_in_dict(struct xbps_handle *xhp,
prop_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver); prop_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver);
prop_dictionary_get_cstring_nocopy(obj, "short_desc", &short_desc); prop_dictionary_get_cstring_nocopy(obj, "short_desc", &short_desc);
if (!pkgver && !short_desc) if (!pkgver || !short_desc)
return EINVAL; return EINVAL;
xbps_pkg_state_dictionary(obj, &state); xbps_pkg_state_dictionary(obj, &state);