summaryrefslogtreecommitdiffstats
path: root/src/protocol_ec25519_fhmqvc.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-20 06:52:03 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-20 06:52:03 +0200
commitf6640a80f4be19e988fd7426c3f897f4d3f614e4 (patch)
tree3b6764fc547ee9ea1559ed1fb2c9b4fd4eb0726a /src/protocol_ec25519_fhmqvc.c
parentd9dc87d8409ddf8361b7fcb311ae97088ed1d984 (diff)
downloadfastd-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.c2
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) {