diff options
author | ache <ache@FreeBSD.org> | 1997-05-24 21:45:55 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-05-24 21:45:55 +0000 |
commit | d192c5521c726c0f771eb852310f3d8b0c6ea4fe (patch) | |
tree | 2f848ea0897afd783114230465eb6a4d8bc44d7b /usr.sbin/pkg_install | |
parent | 27968b9dee3375f2cd12c8989fbda247707bacd0 (diff) | |
download | FreeBSD-src-d192c5521c726c0f771eb852310f3d8b0c6ea4fe.zip FreeBSD-src-d192c5521c726c0f771eb852310f3d8b0c6ea4fe.tar.gz |
When no last file specified for % command user barf(error diagnostic)
instead of segmentation fault
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r-- | usr.sbin/pkg_install/add/extract.c | 4 |
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) |