diff options
author | delphij <delphij@FreeBSD.org> | 2009-10-05 21:11:04 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-10-05 21:11:04 +0000 |
commit | a71c2bfcab51b8a7e7359a2c1a1a7ba7612bc6d7 (patch) | |
tree | a39168e153406d9181496363bd644a27c25e9db0 /lib/libc/gen/fts.3 | |
parent | 7e261d5659ff5086d3f0055f0d6ba9ede8e15f30 (diff) | |
download | FreeBSD-src-a71c2bfcab51b8a7e7359a2c1a1a7ba7612bc6d7.zip FreeBSD-src-a71c2bfcab51b8a7e7359a2c1a1a7ba7612bc6d7.tar.gz |
fts_open() requires that the list passed as argument to contain at least
one path. When the list is empty (contain only a NULL pointer), return
EINVAL instead of pretending to succeed, which will cause a NULL pointer
deference in a later fts_read() call.
Noticed by: Christoph Mallon (via rdivacky@)
MFC after: 2 weeks
Diffstat (limited to 'lib/libc/gen/fts.3')
-rw-r--r-- | lib/libc/gen/fts.3 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3 index 8e1a1e4..dfe2de0 100644 --- a/lib/libc/gen/fts.3 +++ b/lib/libc/gen/fts.3 @@ -28,7 +28,7 @@ .\" @(#)fts.3 8.5 (Berkeley) 4/16/94 .\" $FreeBSD$ .\" -.Dd January 26, 2008 +.Dd October 5, 2009 .Dt FTS 3 .Os .Sh NAME @@ -776,7 +776,7 @@ may fail and set as follows: .Bl -tag -width Er .It Bq Er EINVAL -The options were invalid. +The options were invalid, or the list were empty. .El .Sh SEE ALSO .Xr find 1 , |