diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-03-16 19:05:20 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-03-16 19:05:20 +0000 |
commit | 7e2b960721c72e72639ea828c5fe48c267966e12 (patch) | |
tree | 3f8275b418551a43d998d642fbf1ffec7a5040d7 /lib/libc | |
parent | 444a1a73ad9d36fd2151530fda6152998ff82048 (diff) | |
download | FreeBSD-src-7e2b960721c72e72639ea828c5fe48c267966e12.zip FreeBSD-src-7e2b960721c72e72639ea828c5fe48c267966e12.tar.gz |
Bump MAX_GLOBENTRIES up to 16384, so it is a power of two. Add
some comments explaining that this is an arbitrary limit.
Requested by: jkh
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/glob.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index 48209cc..5ed8be4 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -80,7 +80,13 @@ static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; #include "collate.h" -#define MAX_GLOBENTRIES 10000 /* limit number of entries */ +/* + * XXX + * Arbitrarily limit the number of pathnames that glob may + * return, to prevent DoS attacks. This should probably be + * configurable by the user. + */ +#define MAX_GLOBENTRIES 16384 #define DOLLAR '$' #define DOT '.' |