[openssh-commits] [openssh] 01/03: upstream: Check for non-NULL before string

git+noreply at mindrot.org git+noreply at mindrot.org
Sat Mar 4 14:45:34 AEDT 2023


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

dtucker pushed a commit to branch master
in repository openssh.

commit e44846a4487d2885ac7f2610be09b1e2bf52249b
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Fri Mar 3 09:48:51 2023 +0000

    upstream: Check for non-NULL before string
    
    comparison. From jjelen at redhat.com via bz#2687.
    
    OpenBSD-Commit-ID: 0d9b2e0cac88a311b5766b1aef737082583c285f
---
 clientloop.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clientloop.c b/clientloop.c
index b46fcdde..1bdc7e61 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.388 2023/03/03 02:37:58 dtucker Exp $ */
+/* $OpenBSD: clientloop.c,v 1.389 2023/03/03 09:48:51 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -2112,7 +2112,7 @@ update_known_hosts(struct hostkeys_update_ctx *ctx)
 			free(response);
 			response = read_passphrase("Accept updated hostkeys? "
 			    "(yes/no): ", RP_ECHO);
-			if (strcasecmp(response, "yes") == 0)
+			if (response != NULL && strcasecmp(response, "yes") == 0)
 				break;
 			else if (quit_pending || response == NULL ||
 			    strcasecmp(response, "no") == 0) {

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


More information about the openssh-commits mailing list