aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2020-01-23 09:13:02 +0100
committerAndreas Schneider <asn@cryptomilk.org>2020-01-23 09:19:07 +0100
commit4b4f568a681394b73f2646a5533ae96e9f376645 (patch)
tree8336ca2b5ef03b780db2e0eb9251642095c1174f /src
parent63240148664f82e124d4848c100fcec179b9c9e4 (diff)
downloadlibssh-4b4f568a681394b73f2646a5533ae96e9f376645.tar.gz
libssh-4b4f568a681394b73f2646a5533ae96e9f376645.tar.xz
libssh-4b4f568a681394b73f2646a5533ae96e9f376645.zip
messages: Add missing NULL check
CID #1409678 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/messages.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/messages.c b/src/messages.c
index 93121fe7..25683b23 100644
--- a/src/messages.c
+++ b/src/messages.c
@@ -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) {