diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-20 06:52:03 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-20 06:52:03 +0200 |
commit | f6640a80f4be19e988fd7426c3f897f4d3f614e4 (patch) | |
tree | 3b6764fc547ee9ea1559ed1fb2c9b4fd4eb0726a /src/protocol_ec25519_fhmqvc.c | |
parent | d9dc87d8409ddf8361b7fcb311ae97088ed1d984 (diff) | |
download | fastd-f6640a80f4be19e988fd7426c3f897f4d3f614e4.tar fastd-f6640a80f4be19e988fd7426c3f897f4d3f614e4.zip |
Prevent zero-before-free operations from being optimized out
Diffstat (limited to 'src/protocol_ec25519_fhmqvc.c')
-rw-r--r-- | src/protocol_ec25519_fhmqvc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocol_ec25519_fhmqvc.c b/src/protocol_ec25519_fhmqvc.c index b3bd8a5..b687a91 100644 --- a/src/protocol_ec25519_fhmqvc.c +++ b/src/protocol_ec25519_fhmqvc.c @@ -837,7 +837,7 @@ static void protocol_init_peer_state(fastd_context_t *ctx, fastd_peer_t *peer) { static void reset_session(fastd_context_t *ctx, protocol_session_t *session) { if (session->method) session->method->session_free(ctx, session->method_state); - memset(session, 0, sizeof(protocol_session_t)); + secure_memzero(session, sizeof(protocol_session_t)); } static void protocol_reset_peer_state(fastd_context_t *ctx, fastd_peer_t *peer) { |