projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ffe9150
)
Ensure that memory allocated for the ticket is freed
author
Matt Caswell
<matt@openssl.org>
Tue, 15 Mar 2016 11:38:56 +0000
(11:38 +0000)
committer
Matt Caswell
<matt@openssl.org>
Fri, 18 Mar 2016 11:52:22 +0000
(11:52 +0000)
If a call to EVP_DecryptUpdate fails then a memory leak could occur.
Ensure that the memory is freed appropriately.
Issue reported by Guido Vranken.
Reviewed-by: Richard Levitte <levitte@openssl.org>
ssl/t1_lib.c
patch
|
blob
|
history
diff --git
a/ssl/t1_lib.c
b/ssl/t1_lib.c
index 8f5342b39f52b17201b83bec216de7cbf5f1f067..fc7ebe41caf9d683a04ace095128d6037de92e2e 100644
(file)
--- a/
ssl/t1_lib.c
+++ b/
ssl/t1_lib.c
@@
-3162,6
+3162,7
@@
static int tls_decrypt_ticket(SSL *s, const unsigned char *etick,
if (sdec == NULL
|| EVP_DecryptUpdate(ctx, sdec, &slen, p, eticklen) <= 0) {
EVP_CIPHER_CTX_free(ctx);
+ OPENSSL_free(sdec);
return -1;
}
if (EVP_DecryptFinal(ctx, sdec + slen, &mlen) <= 0) {