diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2006-03-31 19:37:33 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2006-03-31 19:37:33 +0000 |
commit | 4295dde08406ad0ff6b450e8ecf05984f1c8c437 (patch) | |
tree | f31c9dea2fe0a7e12d87f3c7bf9fde998183c55c /lib/libc | |
parent | 456a5fcab775e8a18cffd5b1be3cca3a127e30a6 (diff) |
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); } |