info: fix querying of removed, but referenced packages
Check that package name has packages associated with it before dereferencing the pointer. Fixes #345.cute-signatures
parent
f024add886
commit
87420aaf29
|
@ -283,7 +283,7 @@ static int info_package(struct info_ctx *ctx, struct apk_database *db,
|
|||
|
||||
for (i = 0; i < argc; i++) {
|
||||
name = apk_db_query_name(db, APK_BLOB_STR(argv[i]));
|
||||
if (name == NULL) {
|
||||
if (name == NULL || name->pkgs == NULL) {
|
||||
apk_error("Not found: %s", argv[i]);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue