OpenSSL: Check the correct pointer in EC_POINT_invert.
authorSascha Wildner <saw@online.de>
Wed, 30 Apr 2014 09:33:31 +0000 (11:33 +0200)
committerSascha Wildner <saw@online.de>
Wed, 30 Apr 2014 09:33:31 +0000 (11:33 +0200)
It looks like this was copied from EC_POINT_dbl() but the check was
overlooked when adjusting.

Reported-by: plundra on #dragonflybsd
Taken-from:  OpenBSD

crypto/openssl/crypto/ec/ec_lib.c

index de9a0cc..e2c4741 100644 (file)
@@ -942,7 +942,7 @@ int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *
 
 int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx)
        {
-       if (group->meth->dbl == 0)
+       if (group->meth->invert == 0)
                {
                ECerr(EC_F_EC_POINT_INVERT, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
                return 0;