/[pkgs]/devel/openssl/openssl-1.0.0-beta3-ssl-free.patch
ViewVC logotype

Contents of /devel/openssl/openssl-1.0.0-beta3-ssl-free.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Fri Oct 16 11:28:01 2009 UTC (5 weeks, 2 days ago) by tmraz
Branch: MAIN
CVS Tags: openssl-1_0_0-0_10_beta3_fc13
File MIME type: text/x-patch
* Fri Oct 16 2009 Tomas Mraz <tmraz@redhat.com> 1.0.0-0.10.beta3
- fix use of freed memory if SSL_CTX_free() is called before
  SSL_free() (#521342)
1 diff -up openssl-1.0.0-beta3/ssl/ssl_lib.c.ctx-free openssl-1.0.0-beta3/ssl/ssl_lib.c
2 --- openssl-1.0.0-beta3/ssl/ssl_lib.c.ctx-free 2009-10-08 20:44:26.000000000 +0200
3 +++ openssl-1.0.0-beta3/ssl/ssl_lib.c 2009-10-16 11:56:53.000000000 +0200
4 @@ -556,7 +556,6 @@ void SSL_free(SSL *s)
5 if (s->cert != NULL) ssl_cert_free(s->cert);
6 /* Free up if allocated */
7
8 - if (s->ctx) SSL_CTX_free(s->ctx);
9 #ifndef OPENSSL_NO_TLSEXT
10 if (s->tlsext_hostname)
11 OPENSSL_free(s->tlsext_hostname);
12 @@ -580,6 +579,8 @@ void SSL_free(SSL *s)
13
14 if (s->method != NULL) s->method->ssl_free(s);
15
16 + if (s->ctx) SSL_CTX_free(s->ctx);
17 +
18 #ifndef OPENSSL_NO_KRB5
19 if (s->kssl_ctx != NULL)
20 kssl_ctx_free(s->kssl_ctx);
21 diff -up openssl-1.0.0-beta3/ssl/s3_lib.c.hbuf-clear openssl-1.0.0-beta3/ssl/s3_lib.c
22 --- openssl-1.0.0-beta3/ssl/s3_lib.c.hbuf-clear 2009-05-28 20:10:47.000000000 +0200
23 +++ openssl-1.0.0-beta3/ssl/s3_lib.c 2009-10-16 09:50:24.000000000 +0200
24 @@ -2211,6 +2211,7 @@ void ssl3_clear(SSL *s)
25 wlen = s->s3->wbuf.len;
26 if (s->s3->handshake_buffer) {
27 BIO_free(s->s3->handshake_buffer);
28 + s->s3->handshake_buffer = NULL;
29 }
30 if (s->s3->handshake_dgst) {
31 ssl3_free_digest_list(s);

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2