From 7e2b960721c72e72639ea828c5fe48c267966e12 Mon Sep 17 00:00:00 2001 From: jlemon Date: Fri, 16 Mar 2001 19:05:20 +0000 Subject: 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 --- lib/libc/gen/glob.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/libc') 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 '.' -- cgit v1.1