diff options
author | tb <> | 2023-04-13 05:25:30 +0000 |
---|---|---|
committer | tb <> | 2023-04-13 05:25:30 +0000 |
commit | ae408965edfcc73a96b5aa5b519a4d94c35e6560 (patch) | |
tree | 599ec3cbc814e53a5e9020539627bdb0c0c1c278 | |
parent | 56c338dd51299acb59ac48f9a42894079def09c9 (diff) | |
download | openbsd-ae408965edfcc73a96b5aa5b519a4d94c35e6560.tar.gz openbsd-ae408965edfcc73a96b5aa5b519a4d94c35e6560.tar.bz2 openbsd-ae408965edfcc73a96b5aa5b519a4d94c35e6560.zip |
ectest: missing error checking
CID 452228
-rw-r--r-- | src/regress/lib/libcrypto/ec/ectest.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/regress/lib/libcrypto/ec/ectest.c b/src/regress/lib/libcrypto/ec/ectest.c index c4ef840ff2..2b9c6a99f3 100644 --- a/src/regress/lib/libcrypto/ec/ectest.c +++ b/src/regress/lib/libcrypto/ec/ectest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ectest.c,v 1.12 2021/04/20 17:35:21 tb Exp $ */ | 1 | /* $OpenBSD: ectest.c,v 1.13 2023/04/13 05:25:30 tb Exp $ */ |
2 | /* crypto/ec/ectest.c */ | 2 | /* crypto/ec/ectest.c */ |
3 | /* | 3 | /* |
4 | * Originally written by Bodo Moeller for the OpenSSL project. | 4 | * Originally written by Bodo Moeller for the OpenSSL project. |
@@ -103,11 +103,17 @@ group_order_tests(EC_GROUP *group) | |||
103 | BIGNUM *n1, *n2, *order; | 103 | BIGNUM *n1, *n2, *order; |
104 | EC_POINT *P = EC_POINT_new(group); | 104 | EC_POINT *P = EC_POINT_new(group); |
105 | EC_POINT *Q = EC_POINT_new(group); | 105 | EC_POINT *Q = EC_POINT_new(group); |
106 | BN_CTX *ctx = BN_CTX_new(); | 106 | BN_CTX *ctx; |
107 | 107 | ||
108 | n1 = BN_new(); | 108 | if ((ctx = BN_CTX_new()) == NULL) |
109 | n2 = BN_new(); | 109 | ABORT; |
110 | order = BN_new(); | 110 | |
111 | if ((n1 = BN_new()) == NULL) | ||
112 | ABORT; | ||
113 | if ((n2 = BN_new()) == NULL) | ||
114 | ABORT; | ||
115 | if ((order = BN_new()) == NULL) | ||
116 | ABORT; | ||
111 | fprintf(stdout, "verify group order ..."); | 117 | fprintf(stdout, "verify group order ..."); |
112 | fflush(stdout); | 118 | fflush(stdout); |
113 | if (!EC_GROUP_get_order(group, order, ctx)) | 119 | if (!EC_GROUP_get_order(group, order, ctx)) |