artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd1a6ee
)
BN_one() can fail, check its return value.
author
jsing
<jsing@openbsd.org>
Thu, 1 Dec 2022 02:58:40 +0000
(
02:58
+0000)
committer
jsing
<jsing@openbsd.org>
Thu, 1 Dec 2022 02:58:40 +0000
(
02:58
+0000)
regress/lib/libcrypto/exp/exptest.c
patch
|
blob
|
history
diff --git
a/regress/lib/libcrypto/exp/exptest.c
b/regress/lib/libcrypto/exp/exptest.c
index
e626007
..
ea744c2
100644
(file)
--- a/
regress/lib/libcrypto/exp/exptest.c
+++ b/
regress/lib/libcrypto/exp/exptest.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: exptest.c,v 1.
8 2021/11/18 15:17:31 tb Exp $
*/
+/* $OpenBSD: exptest.c,v 1.
9 2022/12/01 02:58:40 jsing Exp $
*/
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@
-110,11
+110,13
@@
test_exp_mod_zero(void)
goto err;
if ((m = BN_new()) == NULL)
goto err;
- BN_one(m);
+ if (!BN_one(m))
+ goto err;
if ((a = BN_new()) == NULL)
goto err;
- BN_one(a);
+ if (!BN_one(a))
+ goto err;
if ((p = BN_new()) == NULL)
goto err;