From: inoguchi Date: Thu, 20 Jan 2022 11:12:14 +0000 (+0000) Subject: Fix check for BN_mod_inverse_ct return value X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=cb26bec3df003b2ef82d07169f54ccc3ed742a49;p=openbsd Fix check for BN_mod_inverse_ct return value ok jsing@ millert@ tb@ --- diff --git a/lib/libcrypto/sm2/sm2_sign.c b/lib/libcrypto/sm2/sm2_sign.c index d306658a48a..b35de841b10 100644 --- a/lib/libcrypto/sm2/sm2_sign.c +++ b/lib/libcrypto/sm2/sm2_sign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sm2_sign.c,v 1.1.1.1 2021/08/18 16:04:32 tb Exp $ */ +/* $OpenBSD: sm2_sign.c,v 1.2 2022/01/20 11:12:14 inoguchi Exp $ */ /* * Copyright (c) 2017, 2019 Ribose Inc * @@ -194,7 +194,7 @@ sm2_sig_gen(const EC_KEY *key, const BIGNUM *e) goto err; } - if (!BN_mod_inverse_ct(s, s, order, ctx)) { + if (BN_mod_inverse_ct(s, s, order, ctx) == NULL) { SM2error(ERR_R_BN_LIB); goto err; }