[openssh-commits] [openssh] 01/01: Sync rev 1.49.

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Apr 21 18:28:42 AEST 2020


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 8854724ccefc1fa16f10b37eda2e759c98148caa
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Tue Apr 21 18:27:23 2020 +1000

    Sync rev 1.49.
    
    Prevent infinite for loop since i went from ssize_t to size_t.  Patch from
    eagleoflqj via OpenSSH github PR#178, ok djm@, feedback & ok millert@
---
 openbsd-compat/glob.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c
index 9dcc4442..e8915178 100644
--- a/openbsd-compat/glob.c
+++ b/openbsd-compat/glob.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: glob.c,v 1.48 2019/02/04 16:45:40 millert Exp $ */
+/*	$OpenBSD: glob.c,v 1.49 2020/04/21 08:25:22 dtucker Exp $ */
 /*
  * Copyright (c) 1989, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -833,7 +833,7 @@ globextend(const Char *path, glob_t *pglob, struct glob_lim *limitp,
 	if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
 		/* first time around -- clear initial gl_offs items */
 		pathv += pglob->gl_offs;
-		for (i = pglob->gl_offs; --i >= 0; )
+		for (i = pglob->gl_offs; i > 0; i--)
 			*--pathv = NULL;
 	}
 	pglob->gl_pathv = pathv;
@@ -845,7 +845,7 @@ globextend(const Char *path, glob_t *pglob, struct glob_lim *limitp,
 		if (pglob->gl_statv == NULL && pglob->gl_offs > 0) {
 			/* first time around -- clear initial gl_offs items */
 			statv += pglob->gl_offs;
-			for (i = pglob->gl_offs; --i >= 0; )
+			for (i = pglob->gl_offs; i > 0; i--)
 				*--statv = NULL;
 		}
 		pglob->gl_statv = statv;

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list