summaryrefslogtreecommitdiff
path: root/ssl
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-01-11 08:18:55 +0000
committerBodo Möller <bodo@openssl.org>2000-01-11 08:18:55 +0000
commitcc96f6b7a491b99714cd12712db6289e4d6dbb17 (patch)
tree95961bd309f4faeeecdfd7bed1ad9089fa33116c /ssl
parent3cc6cdea0f673eadc61b97756a2ff46281749b5e (diff)
downloadopenssl-new-cc96f6b7a491b99714cd12712db6289e4d6dbb17.tar.gz
add check for internal error
Diffstat (limited to 'ssl')
-rw-r--r--ssl/s3_pkt.c5
1 files changed, 5 insertions, 0 deletions
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;