mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
crypto_kx(): abort if the function is called without any non-NULL pointer
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user