diff options
author | Michael Schupikov <michael@schupikov.de> | 2018-10-07 13:58:10 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-10-12 14:20:45 +0800 |
commit | 243cc86fe99602c8bd2ff3b3a5b7cf239394cb8c (patch) | |
tree | fe83993406bd820824dc216ba8f2425095033a1f /crypto/aegis256.c | |
parent | fa68eaf25cc823635dc4de692c66186b0246b677 (diff) | |
download | linux-crypto-243cc86fe99602c8bd2ff3b3a5b7cf239394cb8c.tar.gz linux-crypto-243cc86fe99602c8bd2ff3b3a5b7cf239394cb8c.zip |
crypto: testmgr - fix sizeof() on COMP_BUF_SIZE
After allocation, output and decomp_output both point to memory chunks of
size COMP_BUF_SIZE. Then, only the first bytes are zeroed out using
sizeof(COMP_BUF_SIZE) as parameter to memset(), because
sizeof(COMP_BUF_SIZE) provides the size of the constant and not the size of
allocated memory.
Instead, the whole allocated memory is meant to be zeroed out. Use
COMP_BUF_SIZE as parameter to memset() directly in order to accomplish
this.
Fixes: c1de538a53694 ("crypto: testmgr - Allow different compression results")
Signed-off-by: Michael Schupikov <michael@schupikov.de>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/aegis256.c')
0 files changed, 0 insertions, 0 deletions