chacha_encrypt_bytes(): ensure that the padding bytes are initialized

Reported by Pascal Cuoq
This commit is contained in:
Frank Denis
2015-10-26 20:44:48 +01:00
parent 771e32bd18
commit b3417560f1
@@ -131,6 +131,7 @@ chacha_encrypt_bytes(chacha_ctx *x, const u8 *m, u8 *c, unsigned long long bytes
for (;;) {
if (bytes < 64) {
memset(tmp, 0, 64);
for (i = 0; i < bytes; ++i) {
tmp[i] = m[i];
}