In lib/freebl/ec/ec2_mont.c, function ec_GF2m_pt_mul_mont has two useless assignment statements. In rev. 1.2 of the file, we have: 208 MP_CHECKOK(mp_copy(rx, &x2)); /* x2 = rx */ 209 MP_CHECKOK(mp_copy(ry, &z2)); /* z2 = ry */ 210 211 MP_CHECKOK(mp_copy(px, &x1)); /* x1 = px */ 212 MP_CHECKOK(mp_set_int(&z1, 1)); /* z1 = 1 */ 213 MP_CHECKOK(group->meth->field_sqr(&x1, &z2, group->meth)); /* z2 = 214 * x1^2 = 215 * x2^2 */ 216 MP_CHECKOK(group->meth->field_sqr(&z2, &x2, group->meth)); The value assigned to x2 in line 208 is never used. It is discarded in line 216. The value assigned to z2 in line 209 is never used. It is discarded in line 213. So the assignment statements in lines 208 and 209 can be removed. Also, the comment in line 215 should say px^2 instead of x2^2.
Created attachment 230495 [details] [diff] [review] Proposed patch
Attachment #230495 - Flags: review?(douglas)
I checked in the proposed patch on the NSS trunk (NSS 3.12). Checking in ec2_mont.c; /cvsroot/mozilla/security/nss/lib/freebl/ecl/ec2_mont.c,v <-- ec2_mont.c new revision: 1.3; previous revision: 1.2 done
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.12
You need to log in before you can comment on or make changes to this bug.