[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Thu Jul 13 21:36:23 UTC 2017
The branch master has been updated
via c784a838e0947fcca761ee62def7d077dc06d37f (commit)
from 9ee27200c9a396369e47ba1cd60a5a7486777e55 (commit)
- Log -----------------------------------------------------------------
commit c784a838e0947fcca761ee62def7d077dc06d37f
Author: Rich Salz <rsalz at openssl.org>
Date: Sat Jul 8 12:43:55 2017 -0400
Fix bug in err_string_data_cmp
Unsigned overflow. Thanks to Brian Carpenter for reporting this.
Reviewed-by: Tim Hudson <tjh at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3887)
-----------------------------------------------------------------------
Summary of changes:
crypto/err/err.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/crypto/err/err.c b/crypto/err/err.c
index e50c6d6..8d0ed6f 100644
--- a/crypto/err/err.c
+++ b/crypto/err/err.c
@@ -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)
More information about the openssl-commits
mailing list