mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Comment-out dead code in ed25519/ref10
There are some loops of the form for (i=1;i<1;++i) ... And of course, if the loop index is initialized to 1, it will never be less than 1, and the loop body will never be executed. This upsets coverity. Patch fixes CID 1221543 and 1221542
This commit is contained in:
parent
7c52a0555a
commit
27bd1ef100
@ -1,3 +1,4 @@
|
|||||||
|
/* Modified by Tor: pointless loops removed to appease analysis tools */
|
||||||
|
|
||||||
/* qhasm: fe z1 */
|
/* qhasm: fe z1 */
|
||||||
|
|
||||||
@ -50,7 +51,7 @@
|
|||||||
/* qhasm: z2 = z1^2^1 */
|
/* qhasm: z2 = z1^2^1 */
|
||||||
/* asm 1: fe_sq(>z2=fe#1,<z1=fe#11); for (i = 1;i < 1;++i) fe_sq(>z2=fe#1,>z2=fe#1); */
|
/* asm 1: fe_sq(>z2=fe#1,<z1=fe#11); for (i = 1;i < 1;++i) fe_sq(>z2=fe#1,>z2=fe#1); */
|
||||||
/* asm 2: fe_sq(>z2=t0,<z1=z); for (i = 1;i < 1;++i) fe_sq(>z2=t0,>z2=t0); */
|
/* asm 2: fe_sq(>z2=t0,<z1=z); for (i = 1;i < 1;++i) fe_sq(>z2=t0,>z2=t0); */
|
||||||
fe_sq(t0,z); for (i = 1;i < 1;++i) fe_sq(t0,t0);
|
fe_sq(t0,z); /* DEADCODE This loop has no effect: for (i = 1;i < 1;++i) fe_sq(t0,t0); */
|
||||||
|
|
||||||
/* qhasm: z8 = z2^2^2 */
|
/* qhasm: z8 = z2^2^2 */
|
||||||
/* asm 1: fe_sq(>z8=fe#2,<z2=fe#1); for (i = 1;i < 2;++i) fe_sq(>z8=fe#2,>z8=fe#2); */
|
/* asm 1: fe_sq(>z8=fe#2,<z2=fe#1); for (i = 1;i < 2;++i) fe_sq(>z8=fe#2,>z8=fe#2); */
|
||||||
@ -70,7 +71,7 @@ fe_mul(t0,t0,t1);
|
|||||||
/* qhasm: z22 = z11^2^1 */
|
/* qhasm: z22 = z11^2^1 */
|
||||||
/* asm 1: fe_sq(>z22=fe#1,<z11=fe#1); for (i = 1;i < 1;++i) fe_sq(>z22=fe#1,>z22=fe#1); */
|
/* asm 1: fe_sq(>z22=fe#1,<z11=fe#1); for (i = 1;i < 1;++i) fe_sq(>z22=fe#1,>z22=fe#1); */
|
||||||
/* asm 2: fe_sq(>z22=t0,<z11=t0); for (i = 1;i < 1;++i) fe_sq(>z22=t0,>z22=t0); */
|
/* asm 2: fe_sq(>z22=t0,<z11=t0); for (i = 1;i < 1;++i) fe_sq(>z22=t0,>z22=t0); */
|
||||||
fe_sq(t0,t0); for (i = 1;i < 1;++i) fe_sq(t0,t0);
|
fe_sq(t0,t0); /* DEADCODE This loop has no effect: for (i = 1;i < 1;++i) fe_sq(t0,t0); */
|
||||||
|
|
||||||
/* qhasm: z_5_0 = z9*z22 */
|
/* qhasm: z_5_0 = z9*z22 */
|
||||||
/* asm 1: fe_mul(>z_5_0=fe#1,<z9=fe#2,<z22=fe#1); */
|
/* asm 1: fe_mul(>z_5_0=fe#1,<z9=fe#2,<z22=fe#1); */
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* Modified by Tor: pointless loops removed to appease analysis tools */
|
||||||
|
|
||||||
/* qhasm: fe z1 */
|
/* qhasm: fe z1 */
|
||||||
|
|
||||||
@ -50,7 +51,7 @@
|
|||||||
/* qhasm: z2 = z1^2^1 */
|
/* qhasm: z2 = z1^2^1 */
|
||||||
/* asm 1: fe_sq(>z2=fe#1,<z1=fe#11); for (i = 1;i < 1;++i) fe_sq(>z2=fe#1,>z2=fe#1); */
|
/* asm 1: fe_sq(>z2=fe#1,<z1=fe#11); for (i = 1;i < 1;++i) fe_sq(>z2=fe#1,>z2=fe#1); */
|
||||||
/* asm 2: fe_sq(>z2=t0,<z1=z); for (i = 1;i < 1;++i) fe_sq(>z2=t0,>z2=t0); */
|
/* asm 2: fe_sq(>z2=t0,<z1=z); for (i = 1;i < 1;++i) fe_sq(>z2=t0,>z2=t0); */
|
||||||
fe_sq(t0,z); for (i = 1;i < 1;++i) fe_sq(t0,t0);
|
fe_sq(t0,z); /* DEADCODE This loop has no effect: for (i = 1;i < 1;++i) fe_sq(t0,t0); */
|
||||||
|
|
||||||
/* qhasm: z8 = z2^2^2 */
|
/* qhasm: z8 = z2^2^2 */
|
||||||
/* asm 1: fe_sq(>z8=fe#2,<z2=fe#1); for (i = 1;i < 2;++i) fe_sq(>z8=fe#2,>z8=fe#2); */
|
/* asm 1: fe_sq(>z8=fe#2,<z2=fe#1); for (i = 1;i < 2;++i) fe_sq(>z8=fe#2,>z8=fe#2); */
|
||||||
@ -70,7 +71,7 @@ fe_mul(t0,t0,t1);
|
|||||||
/* qhasm: z22 = z11^2^1 */
|
/* qhasm: z22 = z11^2^1 */
|
||||||
/* asm 1: fe_sq(>z22=fe#3,<z11=fe#1); for (i = 1;i < 1;++i) fe_sq(>z22=fe#3,>z22=fe#3); */
|
/* asm 1: fe_sq(>z22=fe#3,<z11=fe#1); for (i = 1;i < 1;++i) fe_sq(>z22=fe#3,>z22=fe#3); */
|
||||||
/* asm 2: fe_sq(>z22=t2,<z11=t0); for (i = 1;i < 1;++i) fe_sq(>z22=t2,>z22=t2); */
|
/* asm 2: fe_sq(>z22=t2,<z11=t0); for (i = 1;i < 1;++i) fe_sq(>z22=t2,>z22=t2); */
|
||||||
fe_sq(t2,t0); for (i = 1;i < 1;++i) fe_sq(t2,t2);
|
fe_sq(t2,t0); /* DEADCODE This loop has no effect for (i = 1;i < 1;++i) fe_sq(t2,t2); */
|
||||||
|
|
||||||
/* qhasm: z_5_0 = z9*z22 */
|
/* qhasm: z_5_0 = z9*z22 */
|
||||||
/* asm 1: fe_mul(>z_5_0=fe#2,<z9=fe#2,<z22=fe#3); */
|
/* asm 1: fe_mul(>z_5_0=fe#2,<z9=fe#2,<z22=fe#3); */
|
||||||
|
Loading…
Reference in New Issue
Block a user