From: inoguchi Date: Thu, 20 Jan 2022 11:02:44 +0000 (+0000) Subject: Fix check for BN_mod_inverse_ct return value X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=169bfe080112fa3f4893e67e011832c0da244450;p=openbsd Fix check for BN_mod_inverse_ct return value ok jsing@ millert@ tb@ --- diff --git a/lib/libcrypto/ec/ecp_smpl.c b/lib/libcrypto/ec/ecp_smpl.c index 1d0b1d6106b..6f5280bbc97 100644 --- a/lib/libcrypto/ec/ecp_smpl.c +++ b/lib/libcrypto/ec/ecp_smpl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecp_smpl.c,v 1.33 2021/09/08 17:29:21 tb Exp $ */ +/* $OpenBSD: ecp_smpl.c,v 1.34 2022/01/20 11:02:44 inoguchi Exp $ */ /* Includes code written by Lenka Fibikova * for the OpenSSL project. * Includes code written by Bodo Moeller for the OpenSSL project. @@ -586,7 +586,7 @@ ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP * group, const EC_POIN } } } else { - if (!BN_mod_inverse_ct(Z_1, Z_, &group->field, ctx)) { + if (BN_mod_inverse_ct(Z_1, Z_, &group->field, ctx) == NULL) { ECerror(ERR_R_BN_LIB); goto err; } @@ -1316,7 +1316,7 @@ ec_GFp_simple_points_make_affine(const EC_GROUP * group, size_t num, EC_POINT * /* invert heap[1] */ if (!BN_is_zero(heap[1])) { - if (!BN_mod_inverse_ct(heap[1], heap[1], &group->field, ctx)) { + if (BN_mod_inverse_ct(heap[1], heap[1], &group->field, ctx) == NULL) { ECerror(ERR_R_BN_LIB); goto err; }