projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98eab43
)
additional sanity checks for arguments to EC_POINTs_mul()
author
Bodo Möller
<bodo@openssl.org>
Thu, 6 Feb 2003 18:07:23 +0000
(18:07 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Thu, 6 Feb 2003 18:07:23 +0000
(18:07 +0000)
crypto/ec/ec_mult.c
patch
|
blob
|
history
diff --git
a/crypto/ec/ec_mult.c
b/crypto/ec/ec_mult.c
index 603ba31b81919dcffad697bd76aaf487b149c3b5..4dbc93112062cf2577350121fc805283ace6743b 100644
(file)
--- a/
crypto/ec/ec_mult.c
+++ b/
crypto/ec/ec_mult.c
@@
-209,6
+209,17
@@
int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
EC_POINT ***val_sub = NULL; /* pointers to sub-arrays of 'val' */
int ret = 0;
+ if (group->meth != r->meth)
+ {
+ ECerr(EC_F_EC_POINTS_MUL, EC_R_INCOMPATIBLE_OBJECTS);
+ return 0;
+ }
+
+ if ((scalar == NULL) && (num == 0))
+ {
+ return EC_POINT_set_to_infinity(group, r);
+ }
+
if (scalar != NULL)
{
generator = EC_GROUP_get0_generator(group);