From 1788de0cc13f4fe451ee6ae2e138533c0eea3dde Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 16 Sep 2014 16:26:31 +0200 Subject: More fixes for zero-length VLAs --- src/protocols/ec25519_fhmqvc/handshake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/protocols') 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); -- cgit v1.2.3