messages: Add missing NULL check

CID #1409678

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 4b4f568a68)
This commit is contained in:
Andreas Schneider
2020-01-23 09:13:02 +01:00
parent e2c5f5c7d1
commit 112e32ba86

View File

@@ -692,6 +692,9 @@ static ssh_buffer ssh_msg_userauth_build_digest(ssh_session session,
int rc;
crypto = ssh_packet_get_current_crypto(session, SSH_DIRECTION_IN);
if (crypto == NULL) {
return NULL;
}
buffer = ssh_buffer_new();
if (buffer == NULL) {