Wipe buffers to be sure padding is always empty.

Detected by valgrind as writing unitialized data.
This commit is contained in:
Milan Broz
2022-11-27 23:18:36 +01:00
parent 32344d5a84
commit 487e85fdec
2 changed files with 2 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ int crypt_benchmark(struct crypt_device *cd,
r = -ENOMEM;
if (posix_memalign(&buffer, crypt_getpagesize(), buffer_size))
goto out;
memset(buffer, 0, buffer_size);
r = crypt_cipher_ivsize(cipher, cipher_mode);
if (r >= 0 && iv_size != (size_t)r) {