From 1a36aa21ba7ec4fb93120e1854c73d410810897c Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 18 Apr 2018 10:32:15 +0200 Subject: [PATCH] packet_cb: Fix the if check in ssh_packet_newkeys() CID 1388446 Signed-off-by: Andreas Schneider --- src/packet_cb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packet_cb.c b/src/packet_cb.c index 2b407416..fc676257 100644 --- a/src/packet_cb.c +++ b/src/packet_cb.c @@ -180,7 +180,7 @@ SSH_PACKET_CALLBACK(ssh_packet_newkeys){ /* get the server public key */ server_key = ssh_dh_get_next_server_publickey(session); - if (rc < 0) { + if (server_key == NULL) { return SSH_ERROR; }