pkgdb: handle possible NULL pointer derefs (CID #98684).
This commit is contained in:
parent
9d70fcd8d0
commit
a8d2b1d742
@ -151,6 +151,7 @@ pkgdb_map_vpkgs(struct xbps_handle *xhp)
|
|||||||
|
|
||||||
xbps_dictionary_get_cstring_nocopy(pkgd, "pkgver", &pkgver);
|
xbps_dictionary_get_cstring_nocopy(pkgd, "pkgver", &pkgver);
|
||||||
pkgname = xbps_pkg_name(pkgver);
|
pkgname = xbps_pkg_name(pkgver);
|
||||||
|
assert(pkgname);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < xbps_array_count(provides); i++) {
|
for (unsigned int i = 0; i < xbps_array_count(provides); i++) {
|
||||||
const char *vpkg;
|
const char *vpkg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user