提交 a7ff5796 编写于 作者: R Richard Levitte

Fix cipher_compare

Unsigned overflow.  Found by Brian Carpenter

Fixes #3889
Reviewed-by: NTim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3890)
上级 04256277
......@@ -2793,7 +2793,9 @@ static int cipher_compare(const void *a, const void *b)
const SSL_CIPHER *ap = (const SSL_CIPHER *)a;
const SSL_CIPHER *bp = (const SSL_CIPHER *)b;
return ap->id - bp->id;
if (ap->id == bp->id)
return 0;
return ap->id < bp->id ? -1 : 1;
}
void ssl_sort_cipher_list(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册