1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00
This commit is contained in:
Frank Denis 2018-08-27 12:29:49 +02:00
parent f3c49f3bda
commit 1ec6edc1a8

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;