提交 cc96f6b7 编写于 作者: B Bodo Möller

add check for internal error

上级 3cc6cdea
...@@ -167,6 +167,11 @@ static int ssl3_read_n(SSL *s, int n, int max, int extend) ...@@ -167,6 +167,11 @@ static int ssl3_read_n(SSL *s, int n, int max, int extend)
if (max > max_max) if (max > max_max)
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; off = s->packet_length;
newb = s->s3->rbuf.left; newb = s->s3->rbuf.left;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册