summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/fts.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/fts.c b/lib/fts.c
index 2d4e33321..5ea139700 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -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)