projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6776bb7
)
(fts_open): Fail with EINVAL if a caller violates this rule:
author
Jim Meyering
<jim@meyering.net>
Sat, 20 May 2006 22:18:16 +0000
(22:18 +0000)
committer
Jim Meyering
<jim@meyering.net>
Sat, 20 May 2006 22:18:16 +0000
(22:18 +0000)
Either FTS_LOGICAL or FTS_PHYSICAL must be provided to the
fts_open() function.
lib/fts.c
patch
|
blob
|
history
diff --git
a/lib/fts.c
b/lib/fts.c
index
2d4e333
..
5ea1397
100644
(file)
--- 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)