Commit 87420aaf authored by Timo Teräs's avatar Timo Teräs

info: fix querying of removed, but referenced packages

Check that package name has packages associated with it before
dereferencing the pointer. Fixes #345.
parent f024add8
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment