summaryrefslogtreecommitdiffstats
path: root/usr.bin/xinstall
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1996-04-08 10:59:36 +0000
committerjoerg <joerg@FreeBSD.org>1996-04-08 10:59:36 +0000
commitf6c45bb5174567777eaee044f5afcc82762c9438 (patch)
treeede379ff8c6b53c3888778c500e615def488369c /usr.bin/xinstall
parent377be651951dbf0018420123b5b800db6503d1f3 (diff)
downloadFreeBSD-src-f6c45bb5174567777eaee044f5afcc82762c9438.zip
FreeBSD-src-f6c45bb5174567777eaee044f5afcc82762c9438.tar.gz
Don't reference NULL pointers if owner and/or group are omitted.
Pointed out by: somebody on the mailing list who's name i forgot
Diffstat (limited to 'usr.bin/xinstall')
-rw-r--r--usr.bin/xinstall/xinstall.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c
index d14ae11..7b031c4 100644
--- a/usr.bin/xinstall/xinstall.c
+++ b/usr.bin/xinstall/xinstall.c
@@ -40,7 +40,7 @@ static const char copyright[] =
#ifndef lint
/*static char sccsid[] = "From: @(#)xinstall.c 8.1 (Berkeley) 7/21/93";*/
static const char rcsid[] =
- "$Id: xinstall.c,v 1.5 1996/02/08 06:17:50 pst Exp $";
+ "$Id: xinstall.c,v 1.6 1996/04/06 01:50:40 julian Exp $";
#endif /* not lint */
/*-
@@ -172,8 +172,10 @@ main(argc, argv)
#ifdef ALLOW_NUMERIC_IDS
- uid = resolve_uid(owner);
- gid = resolve_gid(group);
+ if (owner)
+ uid = resolve_uid(owner);
+ if (group)
+ gid = resolve_gid(group);
#else
OpenPOWER on IntegriCloud