提交 d84ba7ea 编写于 作者: M Matt Caswell

Added OPENSSL_assert check as per PR#3377 reported by Rainer Jung <rainer.jung@kippdata.de>

上级 a50f7186
......@@ -644,6 +644,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
int i;
s->rwstate=SSL_NOTHING;
OPENSSL_assert(s->s3->wnum <= INT_MAX);
tot=s->s3->wnum;
s->s3->wnum=0;
......@@ -667,7 +668,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
* buffer ... so we trap and report the error in a way the user
* will notice
*/
if ( len < tot)
if (len < tot)
{
SSLerr(SSL_F_SSL3_WRITE_BYTES,SSL_R_BAD_LENGTH);
return(-1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册