[openssh-commits] [openssh] 01/08: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Nov 15 16:09:06 AEDT 2019


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

djm pushed a commit to branch master
in repository openssh.

commit 2b6cba7ee2b8b36f393be739c860a9d2e5d8eb48
Author: Damien Miller <djm at mindrot.org>
Date:   Fri Nov 15 16:00:07 2019 +1100

    upstream commit
    
    revision 1.41
    date: 2014/10/08 05:35:27;  author: deraadt;  state: Exp;  lines: +3 -3;  commitid: JwTGarRLHQKDgPh2;
    obvious realloc -> reallocarray conversion
---
 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 9e7ff9e7..f522e6dd 100644
--- a/openbsd-compat/glob.c
+++ b/openbsd-compat/glob.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: glob.c,v 1.40 2013/09/30 12:02:34 millert Exp $ */
+/*	$OpenBSD: glob.c,v 1.41 2014/10/08 05:35:27 deraadt Exp $ */
 /*
  * Copyright (c) 1989, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -828,7 +828,7 @@ globextend(const Char *path, glob_t *pglob, struct glob_lim *limitp,
 		return(GLOB_NOSPACE);
 	}
 
-	pathv = realloc(pglob->gl_pathv, newn * sizeof(*pathv));
+	pathv = reallocarray(pglob->gl_pathv, newn, sizeof(*pathv));
 	if (pathv == NULL)
 		goto nospace;
 	if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
@@ -840,7 +840,7 @@ globextend(const Char *path, glob_t *pglob, struct glob_lim *limitp,
 	pglob->gl_pathv = pathv;
 
 	if ((pglob->gl_flags & GLOB_KEEPSTAT) != 0) {
-		statv = realloc(pglob->gl_statv, newn * sizeof(*statv));
+		statv = reallocarray(pglob->gl_statv, newn, sizeof(*statv));
 		if (statv == NULL)
 			goto nospace;
 		if (pglob->gl_statv == NULL && pglob->gl_offs > 0) {

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


More information about the openssh-commits mailing list