summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormiod <>2014-04-15 18:55:21 +0000
committermiod <>2014-04-15 18:55:21 +0000
commit5fbff974ec318bfb1a7cdda2d94ac86eaca1937a (patch)
treee0f5f9e996a7ef774f4da43ef55efda9e01c5da3 /src
parentba9abdd4a34f80cbd31771ad00ff074c06e682dc (diff)
downloadopenbsd-5fbff974ec318bfb1a7cdda2d94ac86eaca1937a.tar.gz
openbsd-5fbff974ec318bfb1a7cdda2d94ac86eaca1937a.tar.bz2
openbsd-5fbff974ec318bfb1a7cdda2d94ac86eaca1937a.zip
In EC_POINT_invert(), actually check the correct function pointer for NULL
before attempting to invoke it; trivial one-liner in OpenSSL RT #2569 ignored for 2.5 years.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/ec/ec_lib.c2
-rw-r--r--src/lib/libssl/src/crypto/ec/ec_lib.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c
index de9a0cc2b3..e2c4741b5b 100644
--- a/src/lib/libcrypto/ec/ec_lib.c
+++ b/src/lib/libcrypto/ec/ec_lib.c
@@ -942,7 +942,7 @@ int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *
942 942
943int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx) 943int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx)
944 { 944 {
945 if (group->meth->dbl == 0) 945 if (group->meth->invert == 0)
946 { 946 {
947 ECerr(EC_F_EC_POINT_INVERT, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); 947 ECerr(EC_F_EC_POINT_INVERT, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
948 return 0; 948 return 0;
diff --git a/src/lib/libssl/src/crypto/ec/ec_lib.c b/src/lib/libssl/src/crypto/ec/ec_lib.c
index de9a0cc2b3..e2c4741b5b 100644
--- a/src/lib/libssl/src/crypto/ec/ec_lib.c
+++ b/src/lib/libssl/src/crypto/ec/ec_lib.c
@@ -942,7 +942,7 @@ int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *
942 942
943int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx) 943int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx)
944 { 944 {
945 if (group->meth->dbl == 0) 945 if (group->meth->invert == 0)
946 { 946 {
947 ECerr(EC_F_EC_POINT_INVERT, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); 947 ECerr(EC_F_EC_POINT_INVERT, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
948 return 0; 948 return 0;