summaryrefslogtreecommitdiff
path: root/ssl/s3_pkt.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r--ssl/s3_pkt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index a3b45fba9dc1a..1adc30191138c 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -147,6 +147,8 @@ int ssl3_read_n(SSL *s, int n, int max, int extend)
* at once (as long as it fits into the buffer). */
if (SSL_version(s) == DTLS1_VERSION)
{
+ if (s->s3->rbuf.left == 0 && extend)
+ return 0;
if ( s->s3->rbuf.left > 0 && n > s->s3->rbuf.left)
n = s->s3->rbuf.left;
}