summaryrefslogtreecommitdiffstats
path: root/src/method_aes128_gcm.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/method_aes128_gcm.c
parentd9dc87d8409ddf8361b7fcb311ae97088ed1d984 (diff)
downloadfastd-f6640a80f4be19e988fd7426c3f897f4d3f614e4.tar
fastd-f6640a80f4be19e988fd7426c3f897f4d3f614e4.zip
Prevent zero-before-free operations from being optimized out
Diffstat (limited to 'src/method_aes128_gcm.c')
-rw-r--r--src/method_aes128_gcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/method_aes128_gcm.c b/src/method_aes128_gcm.c
index f392e2e..3670225 100644
--- a/src/method_aes128_gcm.c
+++ b/src/method_aes128_gcm.c
@@ -150,7 +150,7 @@ static void method_session_free(fastd_context_t *ctx, fastd_method_session_state
ctx->conf->crypto_aes128ctr->free_state(ctx, session->cstate_aes128ctr);
ctx->conf->crypto_ghash->free_state(ctx, session->cstate_ghash);
- memset(session, 0, sizeof(fastd_method_session_state_t));
+ secure_memzero(session, sizeof(fastd_method_session_state_t));
free(session);
}
}