diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-07 00:20:50 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-07 00:20:50 +0000 |
commit | 2561f153fe8a421f86196d45ebe606337063e9f3 (patch) | |
tree | aadea49b3409004cff44c57ca8e4ecf7599172cb /usr.sbin | |
parent | 37f1a4a66aae72eec67ccfdac50c4aeb34027f8e (diff) |
ftp bounce protection
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/lpr/lpd/lpd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index 5cd07cc9601..00c3961a83c 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lpd.c,v 1.5 1996/07/04 05:46:54 tholo Exp $ */ +/* $OpenBSD: lpd.c,v 1.6 1996/08/07 00:20:49 deraadt Exp $ */ /* $NetBSD: lpd.c,v 1.7 1996/04/24 14:54:06 mrg Exp $ */ /* @@ -505,7 +505,8 @@ chkhost(f) extern char *inet_ntoa(); f->sin_port = ntohs(f->sin_port); - if (f->sin_family != AF_INET || f->sin_port >= IPPORT_RESERVED) + if (f->sin_family != AF_INET || f->sin_port >= IPPORT_RESERVED || + f->sin_port == 20) fatal("Malformed from address"); /* Need real hostname for temporary filenames */ |