summaryrefslogtreecommitdiff
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 @@
37 - djm@cvs.openbsd.org 2010/10/06 21:10:21 37 - djm@cvs.openbsd.org 2010/10/06 21:10:21
38 [sshconnect.c] 38 [sshconnect.c]
39 swapped args to kill(2) 39 swapped args to kill(2)
40 - (djm) [openbsd-compat/glob.c] restore ARG_MAX compat code.
40 41
4120100924 4220100924
42 - (djm) OpenBSD CVS Sync 43 - (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)
804 pathv[pglob->gl_offs + pglob->gl_pathc] = NULL; 804 pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;
805 805
806 if ((pglob->gl_flags & GLOB_LIMIT) && 806 if ((pglob->gl_flags & GLOB_LIMIT) &&
807 (newn * sizeof(*pathv)) + *limitp >= ARG_MAX) { 807 (newn * sizeof(*pathv)) + *limitp >= (u_int) get_arg_max()) {
808 errno = 0; 808 errno = 0;
809 return(GLOB_NOSPACE); 809 return(GLOB_NOSPACE);
810 } 810 }