提交 6b99e875 编写于 作者: R Richard Levitte

Counter mixed signedness with a cast

Reviewed-by: NViktor Dukhovni <viktor@openssl.org>
上级 2ea92604
......@@ -1717,7 +1717,7 @@ long SSL_ctrl(SSL *s, int cmd, long larg, void *parg)
s->split_send_fragment = s->max_send_fragment;
return 1;
case SSL_CTRL_SET_SPLIT_SEND_FRAGMENT:
if (larg > s->max_send_fragment || larg == 0)
if ((unsigned int)larg > s->max_send_fragment || larg == 0)
return 0;
s->split_send_fragment = larg;
return 1;
......@@ -1871,7 +1871,7 @@ long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
ctx->split_send_fragment = ctx->split_send_fragment;
return 1;
case SSL_CTRL_SET_SPLIT_SEND_FRAGMENT:
if (larg > ctx->max_send_fragment || larg == 0)
if ((unsigned int)larg > ctx->max_send_fragment || larg == 0)
return 0;
ctx->split_send_fragment = larg;
return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册