[openssh-commits] [openssh] 02/08: upstream: aggressively pre-fill the pollfd array with fd=-1

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Nov 18 09:14:32 AEDT 2021


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

djm pushed a commit to branch master
in repository openssh.

commit 06acb04c20ee483fe4757bd12aec870cc4bb1076
Author: deraadt at openbsd.org <deraadt at openbsd.org>
Date:   Fri Nov 12 05:23:49 2021 +0000

    upstream: aggressively pre-fill the pollfd array with fd=-1
    
    OpenBSD-Commit-ID: c2a525de8f83c1a04405bd79122c424140552a5b
---
 ssh-keyscan.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 4cc3cf77..b0c530f3 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keyscan.c,v 1.141 2021/11/11 15:32:32 deraadt Exp $ */
+/* $OpenBSD: ssh-keyscan.c,v 1.142 2021/11/12 05:23:49 deraadt Exp $ */
 /*
  * Copyright 1995, 1996 by David Mazieres <dm at lcs.mit.edu>.
  *
@@ -773,6 +773,8 @@ main(int argc, char **argv)
 		fdlim_set(maxfd);
 	fdcon = xcalloc(maxfd, sizeof(con));
 	read_wait = xcalloc(maxfd, sizeof(struct pollfd));
+	for (j = 0; j < maxfd; j++)
+		read_wait[j].fd = -1;
 
 	for (j = 0; j < fopt_count; j++) {
 		if (argv[j] == NULL)

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


More information about the openssh-commits mailing list