diff options
author | 2006-03-31 19:37:32 +0000 | |
---|---|---|
committer | 2006-03-31 19:37:32 +0000 | |
commit | d690eeb0ab33fb99e4f134e5474e1bbbc44dd84b (patch) | |
tree | 9fc6aad2cfe76ea04781341acc0f8bcebd55366d /lib/libc | |
parent | sprinkle a bit of ARGSUSED (diff) | |
download | wireguard-openbsd-d690eeb0ab33fb99e4f134e5474e1bbbc44dd84b.tar.xz wireguard-openbsd-d690eeb0ab33fb99e4f134e5474e1bbbc44dd84b.zip |
nfds is not constrained by OPEN_MAX for nftw(), only ftw()
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/ftw.3 | 6 | ||||
-rw-r--r-- | lib/libc/gen/nftw.c | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/libc/gen/ftw.3 b/lib/libc/gen/ftw.3 index 10fc986f71c..2b31e67d282 100644 --- a/lib/libc/gen/ftw.3 +++ b/lib/libc/gen/ftw.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ftw.3,v 1.6 2005/07/22 03:16:58 jaredy Exp $ +.\" $OpenBSD: ftw.3,v 1.7 2006/03/31 19:37:32 millert Exp $ .\" .\" Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com> .\" @@ -184,7 +184,9 @@ as follows: .It Bq Er EINVAL The .Fa maxfds -argument is less than 1 or greater than +argument is less than 1 or, in the case of +.Nm ftw +only, greater than .Dv OPEN_MAX . .El .Sh SEE ALSO diff --git a/lib/libc/gen/nftw.c b/lib/libc/gen/nftw.c index dd201b495e2..e4d1a559b3d 100644 --- a/lib/libc/gen/nftw.c +++ b/lib/libc/gen/nftw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nftw.c,v 1.5 2005/08/08 08:05:34 espie Exp $ */ +/* $OpenBSD: nftw.c,v 1.6 2006/03/31 19:37:32 millert Exp $ */ /* * Copyright (c) 2003, 2004 Todd C. Miller <Todd.Miller@courtesan.com> @@ -38,7 +38,7 @@ nftw(const char *path, int (*fn)(const char *, const struct stat *, int, int error = 0, ftsflags, fnflag, postorder, sverrno; /* XXX - nfds is currently unused */ - if (nfds < 1 || nfds > OPEN_MAX) { + if (nfds < 1) { errno = EINVAL; return (-1); } |