pkgdb: handle possible NULL pointer derefs (CID #98684).

This commit is contained in:
Juan RP 2015-07-26 08:08:05 +02:00
parent 9d70fcd8d0
commit a8d2b1d742

View File

@ -151,6 +151,7 @@ pkgdb_map_vpkgs(struct xbps_handle *xhp)
xbps_dictionary_get_cstring_nocopy(pkgd, "pkgver", &pkgver);
pkgname = xbps_pkg_name(pkgver);
assert(pkgname);
for (unsigned int i = 0; i < xbps_array_count(provides); i++) {
const char *vpkg;