diff options
author | Jim Meyering <jim@meyering.net> | 2006-05-20 22:18:16 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-05-20 22:18:16 +0000 |
commit | 8fb9de41d5669147a8b514c5950a1b05f64e477e (patch) | |
tree | 60c670838948bff87facf12b6374bc3da28f167c /lib | |
parent | 6776bb7d3077182e4a227a315d17257edf2d12f5 (diff) | |
download | coreutils-8fb9de41d5669147a8b514c5950a1b05f64e477e.tar.xz |
(fts_open): Fail with EINVAL if a caller violates this rule:
Either FTS_LOGICAL or FTS_PHYSICAL must be provided to the
fts_open() function.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fts.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -291,6 +291,10 @@ fts_open (char * const *argv, __set_errno (EINVAL); return (NULL); } + if ( ! (options & (FTS_LOGICAL | FTS_PHYSICAL))) { + __set_errno (EINVAL); + return (NULL); + } /* Allocate/initialize the stream */ if ((sp = malloc(sizeof(FTS))) == NULL) |