From 8d552ddf43a59059091e918e46f5bd38dad792a7 Mon Sep 17 00:00:00 2001 From: TLINDEN Date: Fri, 17 Apr 2015 11:41:18 +0200 Subject: [PATCH] fixed invalid size used in zeroing buf_clear --- libpcp/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpcp/crypto.c b/libpcp/crypto.c index 042fbce..82207bc 100644 --- a/libpcp/crypto.c +++ b/libpcp/crypto.c @@ -595,7 +595,7 @@ size_t pcp_decrypt_stream_sym(PCPCTX *ptx, Pcpstream *in, Pcpstream* out, byte * ucfree(in_buf, PCP_BLOCK_SIZE_IN); ucfree(buf_cipher, ciphersize); - ucfree(buf_clear, ciphersize); + ucfree(buf_clear, ciphersize - PCP_CRYPTO_ADD); if(recverify != NULL) { /* decrypt the signature */