summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/pkg_install/version/perform.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/pkg_install/version/perform.c b/usr.sbin/pkg_install/version/perform.c
index fd340ff..efc4dff 100644
--- a/usr.sbin/pkg_install/version/perform.c
+++ b/usr.sbin/pkg_install/version/perform.c
@@ -109,6 +109,10 @@ pkg_do(char *pkg)
}
read_plist(&plist, fp);
fclose(fp);
+ if (plist.name == NULL) {
+ warnx("%s does not appear to be a valid package!", pkg);
+ return 1;
+ }
/*
* First we check if the installed package has an origin, and try
OpenPOWER on IntegriCloud