summaryrefslogtreecommitdiffstats
path: root/src/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols')
-rw-r--r--src/protocols/ec25519_fhmqvc/handshake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocols/ec25519_fhmqvc/handshake.c b/src/protocols/ec25519_fhmqvc/handshake.c
index 54c9f02..50fc594 100644
--- a/src/protocols/ec25519_fhmqvc/handshake.c
+++ b/src/protocols/ec25519_fhmqvc/handshake.c
@@ -127,7 +127,7 @@ static inline bool new_session(fastd_peer_t *peer, const fastd_method_info_t *me
if (salt) {
size_t blocks = block_count(method->provider->key_length(method->method), sizeof(fastd_sha256_t));
- fastd_sha256_t secret[blocks];
+ fastd_sha256_t secret[blocks ?: 1];
derive_key(secret, blocks, salt, method->name, A, B, X, Y, sigma);
peer->protocol_state->session.method_state = method->provider->session_init(method->method, (const uint8_t *)secret, initiator);