Bug 1190248: Just initialize the |sign| field of |part| in s_mp_div().
r=rrelyea.
--- a/lib/freebl/mpi/mpi.c
+++ b/lib/freebl/mpi/mpi.c
@@ -4185,25 +4185,24 @@ mp_err s_mp_div(mp_int *rem, /* i: di
s_mp_div_2d(quot, (mp_digit)ix);
s_mp_mod_2d(rem, (mp_digit)ix);
return MP_OKAY;
}
MP_SIGN(rem) = ZPOS;
MP_SIGN(div) = ZPOS;
+ MP_SIGN(&part) = ZPOS;
/* A working temporary for division */
MP_CHECKOK( mp_init_size(&t, MP_ALLOC(rem)));
/* Normalize to optimize guessing */
MP_CHECKOK( s_mp_norm(rem, div, &d) );
- part = *rem;
-
/* Perform the division itself...woo! */
MP_USED(quot) = MP_ALLOC(quot);
/* Find a partial substring of rem which is at least div */
/* If we didn't find one, we're finished dividing */
while (MP_USED(rem) > MP_USED(div) || s_mp_cmp(rem, div) >= 0) {
int i;
int unusedRem;