add check for internal error

This commit is contained in:
Bodo Möller 2000-01-11 08:18:55 +00:00
parent 3cc6cdea0f
commit cc96f6b7a4

View File

@ -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;