From 8b99f44ff964cbd971dc1b34140f51699d3da415 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 16 Jul 2017 16:43:47 +0200 Subject: [PATCH] Abort on misuse in crypto_kx_server_session_keys() too --- src/libsodium/crypto_kx/crypto_kx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libsodium/crypto_kx/crypto_kx.c b/src/libsodium/crypto_kx/crypto_kx.c index 67e2f00e..1d5ee6ef 100644 --- a/src/libsodium/crypto_kx/crypto_kx.c +++ b/src/libsodium/crypto_kx/crypto_kx.c @@ -88,6 +88,9 @@ crypto_kx_server_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES], if (tx == NULL) { tx = rx; } + if (rx == NULL) { + abort(); + } if (crypto_scalarmult(q, server_sk, client_pk) != 0) { return -1; }