diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-11-18 23:30:09 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-11-18 23:30:09 +0000 |
commit | 556168fa9898373687ebf8d3b8b9904a7d8d74ba (patch) | |
tree | 236665e30888e980580fdfcf0fda0205e58b4d94 /libexec/ftpd | |
parent | b439180c2abcbb50a43c5ae9033080de79d8d13b (diff) |
check for out-of-range umask bits from strtol()
Diffstat (limited to 'libexec/ftpd')
-rw-r--r-- | libexec/ftpd/ftpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 816fba20299..a14c5e0bdea 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpd.c,v 1.49 1998/07/23 08:13:38 deraadt Exp $ */ +/* $OpenBSD: ftpd.c,v 1.50 1998/11/18 23:30:08 deraadt Exp $ */ /* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */ /* @@ -309,7 +309,7 @@ main(argc, argv, envp) long val = 0; val = strtol(optarg, &optarg, 8); - if (*optarg != '\0' || val < 0) + if (*optarg != '\0' || val < 0 || (val & ~ACCESSPERMS)) warnx("bad value for -u"); else defumask = val; |