diff options
author | jsing <> | 2022-12-01 02:58:40 +0000 |
---|---|---|
committer | jsing <> | 2022-12-01 02:58:40 +0000 |
commit | 6b167b264a00d811a6f14daa45c93de7e0679e9d (patch) | |
tree | 3b1aa20cbfdbdbf33237f949661b604a5217b8b8 /src/regress/lib | |
parent | d873fdce8c0f766ae04ec8b5987f13dd992d2b96 (diff) | |
download | openbsd-6b167b264a00d811a6f14daa45c93de7e0679e9d.tar.gz openbsd-6b167b264a00d811a6f14daa45c93de7e0679e9d.tar.bz2 openbsd-6b167b264a00d811a6f14daa45c93de7e0679e9d.zip |
BN_one() can fail, check its return value.
Diffstat (limited to 'src/regress/lib')
-rw-r--r-- | src/regress/lib/libcrypto/exp/exptest.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/exp/exptest.c b/src/regress/lib/libcrypto/exp/exptest.c index e6260071b9..ea744c22ea 100644 --- a/src/regress/lib/libcrypto/exp/exptest.c +++ b/src/regress/lib/libcrypto/exp/exptest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: exptest.c,v 1.8 2021/11/18 15:17:31 tb Exp $ */ | 1 | /* $OpenBSD: exptest.c,v 1.9 2022/12/01 02:58:40 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -110,11 +110,13 @@ test_exp_mod_zero(void) | |||
110 | goto err; | 110 | goto err; |
111 | if ((m = BN_new()) == NULL) | 111 | if ((m = BN_new()) == NULL) |
112 | goto err; | 112 | goto err; |
113 | BN_one(m); | 113 | if (!BN_one(m)) |
114 | goto err; | ||
114 | 115 | ||
115 | if ((a = BN_new()) == NULL) | 116 | if ((a = BN_new()) == NULL) |
116 | goto err; | 117 | goto err; |
117 | BN_one(a); | 118 | if (!BN_one(a)) |
119 | goto err; | ||
118 | 120 | ||
119 | if ((p = BN_new()) == NULL) | 121 | if ((p = BN_new()) == NULL) |
120 | goto err; | 122 | goto err; |