diff options
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index a16fe05c44..327cda900b 100644 --- a/src/lib/libcrypto/ec/ec_lib.c +++ b/src/lib/libcrypto/ec/ec_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_lib.c,v 1.76 2024/11/02 15:58:49 tb Exp $ */ | 1 | /* $OpenBSD: ec_lib.c,v 1.77 2024/11/03 13:53:14 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -1001,9 +1001,14 @@ int | |||
| 1001 | EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *point, | 1001 | EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *point, |
| 1002 | BIGNUM *x, BIGNUM *y, BN_CTX *ctx_in) | 1002 | BIGNUM *x, BIGNUM *y, BN_CTX *ctx_in) |
| 1003 | { | 1003 | { |
| 1004 | BN_CTX *ctx; | 1004 | BN_CTX *ctx = NULL; |
| 1005 | int ret = 0; | 1005 | int ret = 0; |
| 1006 | 1006 | ||
| 1007 | if (EC_POINT_is_at_infinity(group, point) > 0) { | ||
| 1008 | ECerror(EC_R_POINT_AT_INFINITY); | ||
| 1009 | goto err; | ||
| 1010 | } | ||
| 1011 | |||
| 1007 | if ((ctx = ctx_in) == NULL) | 1012 | if ((ctx = ctx_in) == NULL) |
| 1008 | ctx = BN_CTX_new(); | 1013 | ctx = BN_CTX_new(); |
| 1009 | if (ctx == NULL) | 1014 | if (ctx == NULL) |
