mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bugzilla Bug 303116: this file doesn't need to include <strings.h>, which
doesn't exist on Windows. r=relyea. Bugzilla Bug 303130: fixed memory leak of mp_int in ECPoints_mul. r=douglas.stebila.
This commit is contained in:
parent
1a825a8d3e
commit
19e9429f0d
@ -41,7 +41,6 @@
|
||||
#include "ecl.h"
|
||||
#include "ecl-priv.h"
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
|
||||
/* Elliptic curve scalar-point multiplication. Computes R(x, y) = k * P(x,
|
||||
* y). If x, y = NULL, then P is assumed to be the generator (base point)
|
||||
@ -345,17 +344,13 @@ ECPoints_mul(const ECGroup *group, const mp_int *k1, const mp_int *k2,
|
||||
|
||||
/* if points_mul is defined, then use it */
|
||||
if (group->points_mul) {
|
||||
return group->points_mul(k1p, k2p, px, py, rx, ry, group);
|
||||
res = group->points_mul(k1p, k2p, px, py, rx, ry, group);
|
||||
} else {
|
||||
return ec_pts_mul_simul_w2(k1p, k2p, px, py, rx, ry, group);
|
||||
res = ec_pts_mul_simul_w2(k1p, k2p, px, py, rx, ry, group);
|
||||
}
|
||||
|
||||
CLEANUP:
|
||||
if (k1 != k1p) {
|
||||
mp_clear(&k1t);
|
||||
}
|
||||
if (k2 != k2p) {
|
||||
mp_clear(&k2t);
|
||||
}
|
||||
mp_clear(&k1t);
|
||||
mp_clear(&k2t);
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user