summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-05-25 15:20:49 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-05-25 15:20:49 +0000
commit3d52f1d52b813652c845887d17c69699a92086d7 (patch)
treec39f3b5280639cd2aefe9fc13ccbc019a3e4da34 /ssl
parentfd60dfa0f2a9175f83955d6ad730392aa039aa5b (diff)
PR: 2533
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Setting SSL_MODE_RELEASE_BUFFERS should be ignored for DTLS, but instead causes the program to crash. This is due to missing version checks and is fixed with this patch.
Diffstat (limited to 'ssl')
-rw-r--r--ssl/s3_pkt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index ee103cd242..d1a18ee276 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -247,7 +247,8 @@ int ssl3_read_n(SSL *s, int n, int max, int extend)
if (i <= 0)
{
rb->left = left;
- if (s->mode & SSL_MODE_RELEASE_BUFFERS)
+ if (s->mode & SSL_MODE_RELEASE_BUFFERS &&
+ SSL_version(s) != DTLS1_VERSION && SSL_version(s) != DTLS1_BAD_VER)
if (len+left == 0)
ssl3_release_read_buffer(s);
return(i);
@@ -866,7 +867,8 @@ int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
{
wb->left=0;
wb->offset+=i;
- if (s->mode & SSL_MODE_RELEASE_BUFFERS)
+ if (s->mode & SSL_MODE_RELEASE_BUFFERS &&
+ SSL_version(s) != DTLS1_VERSION && SSL_version(s) != DTLS1_BAD_VER)
ssl3_release_write_buffer(s);
s->rwstate=SSL_NOTHING;
return(s->s3->wpend_ret);