This commit is contained in:
Frank Denis 2018-08-27 12:29:49 +02:00
parent d7df251cd0
commit 2fe2893616

View File

@ -695,7 +695,7 @@ sodium_pad(size_t *padded_buflen_p, unsigned char *buf,
}
mask = 0U;
for (i = 0; i < blocksize; i++) {
barrier_mask = (unsigned char)(((i ^ xpadlen) - 1U)
barrier_mask = (unsigned char) (((i ^ xpadlen) - 1U)
>> ((sizeof(size_t) - 1) * CHAR_BIT));
tail[-i] = (tail[-i] & mask) | (0x80 & barrier_mask);
mask |= barrier_mask;