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:
7fb4c82
)
Don't double free the write bio
author
Matt Caswell
<matt@openssl.org>
Thu, 21 Jul 2016 09:28:24 +0000
(10:28 +0100)
committer
Matt Caswell
<matt@openssl.org>
Fri, 29 Jul 2016 13:09:57 +0000
(14:09 +0100)
When setting the read bio we free up any old existing one. However this can
lead to a double free if the existing one is the same as the write bio.
Reviewed-by: Rich Salz <rsalz@openssl.org>
ssl/ssl_lib.c
patch
|
blob
|
history
diff --git
a/ssl/ssl_lib.c
b/ssl/ssl_lib.c
index 4288c6fbbc639bf6ee4076d3ca002e8aa5fb929b..c49fc5c704b4569130c1e2e0dfeab33fdb0eb3b6 100644
(file)
--- a/
ssl/ssl_lib.c
+++ b/
ssl/ssl_lib.c
@@
-1045,7
+1045,7
@@
void SSL_free(SSL *s)
void SSL_set_rbio(SSL *s, BIO *rbio)
{
- if (s->rbio != rbio)
+ if (s->rbio != rbio
&& s->rbio != s->wbio
)
BIO_free_all(s->rbio);
s->rbio = rbio;
}