From cc96f6b7a491b99714cd12712db6289e4d6dbb17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bodo=20M=C3=B6ller?= Date: Tue, 11 Jan 2000 08:18:55 +0000 Subject: [PATCH] add check for internal error --- ssl/s3_pkt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index 7728284bef..93d1461a32 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -167,6 +167,11 @@ static int ssl3_read_n(SSL *s, int n, int max, int extend) if (max > max_max) max = max_max; } + if (n > max) /* does not happen */ + { + SSLerr(SSL_F_SSL3_READ_N,SSL_R_INTERNAL_ERROR); + return -1; + } off = s->packet_length; newb = s->s3->rbuf.left; -- GitLab