crypto_kx(): abort if the function is called without any non-NULL pointer

This commit is contained in:
Frank Denis 2017-07-16 16:37:47 +02:00
parent 90658321d3
commit 765ba55cdc

View File

@ -47,6 +47,9 @@ crypto_kx_client_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES],
if (tx == NULL) {
tx = rx;
}
if (rx == NULL) {
abort();
}
if (crypto_scalarmult(q, client_sk, server_pk) != 0) {
return -1;
}