From b38c76745c81f93e7a9f14d774210ee985f47b6a Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 8 Aug 2013 12:34:06 +0200 Subject: aes128-gcm: don't restore buffer on verification failure The buffer descriptor is a local variable and no buffer data is changed, so there is nothing to restore before returning --- src/method_aes128_gcm.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/method_aes128_gcm.c b/src/method_aes128_gcm.c index 81edd7c..c6dafb4 100644 --- a/src/method_aes128_gcm.c +++ b/src/method_aes128_gcm.c @@ -262,10 +262,6 @@ static bool method_decrypt(fastd_context_t *ctx, fastd_peer_t *peer, fastd_metho if (!ok || memcmp(&sig, &outblocks[0], sizeof(fastd_block128_t)) != 0) { fastd_buffer_free(*out); - - /* restore input buffer */ - fastd_buffer_pull_head(ctx, &in, NONCEBYTES); - return false; } -- cgit v1.2.3