summaryrefslogtreecommitdiffstats
path: root/src/protocols
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-09-16 16:26:31 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-09-16 16:26:31 +0200
commit1788de0cc13f4fe451ee6ae2e138533c0eea3dde (patch)
tree934f64cae6e1bdf486b7c11558464407e619b25d /src/protocols
parent18e13778e5bfd4609804f37140613208ea620b23 (diff)
downloadfastd-1788de0cc13f4fe451ee6ae2e138533c0eea3dde.tar
fastd-1788de0cc13f4fe451ee6ae2e138533c0eea3dde.zip
More fixes for zero-length VLAs
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);