summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--openbsd-compat/glob.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f1f6738f3..3ddf1f961 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@
- djm@cvs.openbsd.org 2010/10/06 21:10:21
[sshconnect.c]
swapped args to kill(2)
+ - (djm) [openbsd-compat/glob.c] restore ARG_MAX compat code.
20100924
- (djm) OpenBSD CVS Sync
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c
index 7bbe6c71a..e52bef729 100644
--- a/openbsd-compat/glob.c
+++ b/openbsd-compat/glob.c
@@ -804,7 +804,7 @@ globextend(const Char *path, glob_t *pglob, size_t *limitp, struct stat *sb)
pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;
if ((pglob->gl_flags & GLOB_LIMIT) &&
- (newn * sizeof(*pathv)) + *limitp >= ARG_MAX) {
+ (newn * sizeof(*pathv)) + *limitp >= (u_int) get_arg_max()) {
errno = 0;
return(GLOB_NOSPACE);
}