diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-03-17 23:46:21 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-03-24 22:03:00 +0800 |
commit | 0d13d8f26c4684a077b293b8a4615170253f842c (patch) | |
tree | 2976923f49f7c31f6fd3da08d5ce6bb651a060e2 /drivers/crypto | |
parent | 106d73340f46538d29547ac06271f55de0f4d14e (diff) | |
download | linux-0d13d8f26c4684a077b293b8a4615170253f842c.tar.bz2 |
crypto: zip - Memory corruption in zip_clear_stats()
There is a typo here. It should be "stats" instead of "state". The
impact is that we clear 224 bytes instead of 80 and we zero out memory
that we shouldn't.
Fixes: 09ae5d37e093 ("crypto: zip - Add Compression/Decompression statistics")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/cavium/zip/zip_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/cavium/zip/zip_main.c b/drivers/crypto/cavium/zip/zip_main.c index 0951e20b395b..6ff13d80d82e 100644 --- a/drivers/crypto/cavium/zip/zip_main.c +++ b/drivers/crypto/cavium/zip/zip_main.c @@ -530,7 +530,7 @@ static int zip_clear_stats(struct seq_file *s, void *unused) for (index = 0; index < MAX_ZIP_DEVICES; index++) { if (zip_dev[index]) { memset(&zip_dev[index]->stats, 0, - sizeof(struct zip_state)); + sizeof(struct zip_stats)); seq_printf(s, "Cleared stats for zip %d\n", index); } } |