Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: nss/lib/freebl/ecl/ecl_mult.c

Issue 1504923011: Update NSS to 3.21 RTM and NSPR to 4.11 RTM (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: nss/lib/freebl/ecl/ecl_mult.c
diff --git a/nss/lib/freebl/ecl/ecl_mult.c b/nss/lib/freebl/ecl/ecl_mult.c
index a99ca82505ec5241a6c69c077ee86f968a7aa5f4..5932828bd1336a40c3302875443ad3fb455936b5 100644
--- a/nss/lib/freebl/ecl/ecl_mult.c
+++ b/nss/lib/freebl/ecl/ecl_mult.c
@@ -129,7 +129,7 @@ ec_pts_mul_simul_w2(const mp_int *k1, const mp_int *k2, const mp_int *px,
mp_err res = MP_OKAY;
mp_int precomp[4][4][2];
const mp_int *a, *b;
- int i, j;
+ unsigned int i, j;
int ai, bi, d;
ARGCHK(group != NULL, MP_BADARG);
@@ -236,7 +236,7 @@ ec_pts_mul_simul_w2(const mp_int *k1, const mp_int *k2, const mp_int *px,
mp_zero(rx);
mp_zero(ry);
- for (i = d - 1; i >= 0; i--) {
+ for (i = d; i-- > 0;) {
ai = MP_GET_BIT(a, 2 * i + 1);
ai <<= 1;
ai |= MP_GET_BIT(a, 2 * i);

Powered by Google App Engine
This is Rietveld 408576698