bin/xbps-query/list.c: return error if pkgver or short_desc are NULL.
This commit is contained in:
parent
8736ef6c5a
commit
ae254e9b06
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user