提交 c784a838 编写于 作者: R Rich Salz

Fix bug in err_string_data_cmp

Unsigned overflow.  Thanks to Brian Carpenter for reporting this.
Reviewed-by: NTim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3887)
上级 9ee27200
......@@ -162,7 +162,9 @@ static unsigned long err_string_data_hash(const ERR_STRING_DATA *a)
static int err_string_data_cmp(const ERR_STRING_DATA *a,
const ERR_STRING_DATA *b)
{
return (int)(a->error - b->error);
if (a->error == b->error)
return 0;
return a->error > b->error ? 1 : -1;
}
static ERR_STRING_DATA *int_err_get_item(const ERR_STRING_DATA *d)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册