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
This commit is contained in:
Matthias Schiffer 2013-08-08 12:34:06 +02:00
parent 6cf76ca46d
commit b38c76745c

View file

@ -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) { if (!ok || memcmp(&sig, &outblocks[0], sizeof(fastd_block128_t)) != 0) {
fastd_buffer_free(*out); fastd_buffer_free(*out);
/* restore input buffer */
fastd_buffer_pull_head(ctx, &in, NONCEBYTES);
return false; return false;
} }