Stop ed25519 8-bit signed left shift overflowing

Standardise usage in ge_scalarmult_base.c for 1 new fix.
This commit is contained in:
teor 2014-09-28 20:44:00 -04:00 committed by Nick Mathewson
parent 6129ff320e
commit b7eab94a90
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ static void select(ge_precomp *t,int pos,signed char b)
{
ge_precomp minust;
unsigned char bnegative = negative(b);
unsigned char babs = b - (((-bnegative) & b) << 1);
unsigned char babs = b - SHL8( (-bnegative) & (unsigned char)b, 1);
ge_precomp_0(t);
cmov(t,&base[pos][0],equal(babs,1));