summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-05-24 21:45:55 +0000
committerache <ache@FreeBSD.org>1997-05-24 21:45:55 +0000
commitd192c5521c726c0f771eb852310f3d8b0c6ea4fe (patch)
tree2f848ea0897afd783114230465eb6a4d8bc44d7b
parent27968b9dee3375f2cd12c8989fbda247707bacd0 (diff)
downloadFreeBSD-src-d192c5521c726c0f771eb852310f3d8b0c6ea4fe.zip
FreeBSD-src-d192c5521c726c0f771eb852310f3d8b0c6ea4fe.tar.gz
When no last file specified for % command user barf(error diagnostic)
instead of segmentation fault
-rw-r--r--usr.sbin/pkg_install/add/extract.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/add/extract.c b/usr.sbin/pkg_install/add/extract.c
index 4e18292..efc8c05 100644
--- a/usr.sbin/pkg_install/add/extract.c
+++ b/usr.sbin/pkg_install/add/extract.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char *rcsid = "$Id: extract.c,v 1.11 1997/02/22 16:09:16 peter Exp $";
+static const char *rcsid = "$Id: extract.c,v 1.12 1997/02/25 07:22:23 jkh Exp $";
#endif
/*
@@ -145,6 +145,8 @@ extract_plist(char *home, Package *pkg)
break;
case PLIST_CMD:
+ if (last_file == NULL)
+ barf("No last file specified for '%s' command.", p->name);
format_cmd(cmd, p->name, Directory, last_file);
PUSHOUT(Directory);
if (Verbose)
OpenPOWER on IntegriCloud