diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-07-20 19:04:19 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-07-20 19:04:19 +0000 |
commit | 6ca7dc94b8bcbf8dd19d92d8c70a636e16cec9fa (patch) | |
tree | 5de0e85488c744e11264c83ac12fc89053d4d03f /usr.sbin | |
parent | aa947b79701154066641a198b2cb8245f986fcf6 (diff) |
careful with link paths; oliver
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/lpr/lpd/recvjob.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/lpr/lpd/recvjob.c b/usr.sbin/lpr/lpd/recvjob.c index 7766bb1763d..426f8a97ed8 100644 --- a/usr.sbin/lpr/lpd/recvjob.c +++ b/usr.sbin/lpr/lpd/recvjob.c @@ -1,4 +1,4 @@ -/* $OpenBSD: recvjob.c,v 1.9 1997/07/17 06:52:19 millert Exp $ */ +/* $OpenBSD: recvjob.c,v 1.10 1997/07/20 19:04:18 deraadt Exp $ */ /* * Copyright (c) 1983, 1993 @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)recvjob.c 8.2 (Berkeley) 4/27/95"; #else -static char rcsid[] = "$OpenBSD: recvjob.c,v 1.9 1997/07/17 06:52:19 millert Exp $"; +static char rcsid[] = "$OpenBSD: recvjob.c,v 1.10 1997/07/20 19:04:18 deraadt Exp $"; #endif #endif /* not lint */ @@ -183,6 +183,9 @@ readjob() strncpy(tfname, cp, sizeof tfname-1); tfname[sizeof tfname-1] = '\0'; tfname[0] = 't'; + if (strchr(tfname, '/')) + frecverr("readjob: %s: illegal path name", + tfname); if (!chksize(size)) { (void) write(1, "\2", 1); continue; |