From 4d905779e14862463e3701cecb87c70e65662c98 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Mon, 2 May 2016 21:08:55 +0300 Subject: [PATCH] Don't free cryptogram in the store_cipher_body to avoid possible double free memory corruption. The cryptogram pointer is already freed in the end of ecies_encrypt function. --- src/ecies.cpp | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/ecies.cpp b/src/ecies.cpp index 101b322..93a8900 100644 --- a/src/ecies.cpp +++ b/src/ecies.cpp @@ -224,7 +224,6 @@ static int store_cipher_body( if (EVP_EncryptFinal_ex(&cipher, body, &out_len) != 1) { SET_OSSL_ERROR("Error while finalizing the data using the symmetric cipher"); EVP_CIPHER_CTX_cleanup(&cipher); - cryptogram_free(cryptogram); return 0; } -- 1.7.1