mirror of git://anongit.mindrot.org/openssh.git
upstream: Check for non-NULL before string
comparison. From jjelen at redhat.com via bz#2687. OpenBSD-Commit-ID: 0d9b2e0cac88a311b5766b1aef737082583c285f
This commit is contained in:
parent
1842d523fa
commit
e44846a448
|
@ -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@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
|
@ -2112,7 +2112,7 @@ update_known_hosts(struct hostkeys_update_ctx *ctx)
|
||||||
free(response);
|
free(response);
|
||||||
response = read_passphrase("Accept updated hostkeys? "
|
response = read_passphrase("Accept updated hostkeys? "
|
||||||
"(yes/no): ", RP_ECHO);
|
"(yes/no): ", RP_ECHO);
|
||||||
if (strcasecmp(response, "yes") == 0)
|
if (response != NULL && strcasecmp(response, "yes") == 0)
|
||||||
break;
|
break;
|
||||||
else if (quit_pending || response == NULL ||
|
else if (quit_pending || response == NULL ||
|
||||||
strcasecmp(response, "no") == 0) {
|
strcasecmp(response, "no") == 0) {
|
||||||
|
|
Loading…
Reference in New Issue