xbps-pkgdb: add two assertions.
This commit is contained in:
parent
2ba31e048a
commit
42831b97d4
@ -94,7 +94,9 @@ check_pkg_integrity(struct xbps_handle *xhp,
|
|||||||
if (xbps_dictionary_get_cstring_nocopy(opkgd, "metafile-sha256", &sha256)) {
|
if (xbps_dictionary_get_cstring_nocopy(opkgd, "metafile-sha256", &sha256)) {
|
||||||
buf = xbps_xasprintf("%s/.%s-files.plist",
|
buf = xbps_xasprintf("%s/.%s-files.plist",
|
||||||
xhp->metadir, pkgname);
|
xhp->metadir, pkgname);
|
||||||
|
assert(buf);
|
||||||
filesd = xbps_dictionary_internalize_from_zfile(buf);
|
filesd = xbps_dictionary_internalize_from_zfile(buf);
|
||||||
|
assert(filesd);
|
||||||
rv = xbps_file_hash_check(buf, sha256);
|
rv = xbps_file_hash_check(buf, sha256);
|
||||||
free(buf);
|
free(buf);
|
||||||
if (rv == ENOENT) {
|
if (rv == ENOENT) {
|
||||||
|
Loading…
Reference in New Issue
Block a user