Skip to content

Commit

Permalink
Rearrange terms in gf_mul to prevent segfault
Browse files Browse the repository at this point in the history
CLA: trivial

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #23512)

(cherry picked from commit 76cecff)
  • Loading branch information
abaez004 authored and t8m committed Feb 9, 2024
1 parent 64cae40 commit a3e131b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crypto/ec/curve448/arch_64/f_impl64.c
Expand Up @@ -45,9 +45,9 @@ void ossl_gf_mul(gf_s * RESTRICT cs, const gf as, const gf bs)
accum0 += widemul(a[j + 4], b[i - j + 4]);
}
for (; j < 4; j++) {
accum2 += widemul(a[j], b[i - j + 8]);
accum1 += widemul(aa[j], bbb[i - j + 4]);
accum0 += widemul(a[j + 4], bb[i - j + 4]);
accum2 += widemul(a[j], b[i + 8 - j]);
accum1 += widemul(aa[j], bbb[i + 4 - j]);
accum0 += widemul(a[j + 4], bb[i + 4 - j]);
}

accum1 -= accum2;
Expand Down

0 comments on commit a3e131b

Please sign in to comment.