1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-03 06:45:37 -08:00

Avoid a four-byte overread in gcm_ghash_4bit_mmx() on i386

This is a variant of the same logic error fixed in ghash-x86_64.pl r1.6.
The code path is only reachable on machines without FXSR or PCLMUL.

ok jsing
This commit is contained in:
tb 2024-01-24 15:24:28 +00:00
parent 69b1cdd0d2
commit 13e262cf28

View File

@ -714,7 +714,7 @@ sub mmx_loop() {
}
&mov (&LB($nlo),&LB($dat));
&mov ($dat,&DWP(528+$j,"esp")) if (--$j%4==0);
&mov ($dat,&DWP(528+$j,"esp")) if (--$j%4==0 && $j>=0);
&movd ($rem[0],$Zlo);
&movz ($rem[1],&LB($rem[1])) if ($i>0);