diff options
author | KOVACS Krisztian <hidden@sch.bme.hu> | 2014-08-22 10:44:35 +0200 |
---|---|---|
committer | Andreas Blaesius <skate4life@gmx.de> | 2016-06-05 21:21:52 +0200 |
commit | fef0a04692bab91f85b2b5de4d99ee5e256eda94 (patch) | |
tree | 2b7c56be3beba8dd7f8c752699d9ddca3d97c8a5 /crypto/lz4.c | |
parent | 9d48f9fbfc9df873661a99466bd7af98ff0acd95 (diff) | |
download | kernel_samsung_espresso10-fef0a04692bab91f85b2b5de4d99ee5e256eda94.zip kernel_samsung_espresso10-fef0a04692bab91f85b2b5de4d99ee5e256eda94.tar.gz kernel_samsung_espresso10-fef0a04692bab91f85b2b5de4d99ee5e256eda94.tar.bz2 |
crypto: lz4,lz4hc - fix decompression
The lz4 library has two functions for decompression, with slightly
different signatures and behaviour. The lz4_decompress_crypto() function
seemed to be using the one that assumes that the decompressed length is
known in advance.
This patch switches to the other decompression function and makes sure
that the length of the decompressed output is properly returned to the
caller.
The same issue was present in the lz4hc algorithm.
Coincidentally, this change also makes very basic lz4 and lz4hc
compression tests in testmgr pass.
Signed-off-by: KOVACS Krisztian <hidden@sch.bme.hu>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/lz4.c')
-rw-r--r-- | crypto/lz4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/lz4.c b/crypto/lz4.c index 4586dd1..34d072b 100644 --- a/crypto/lz4.c +++ b/crypto/lz4.c @@ -68,7 +68,7 @@ static int lz4_decompress_crypto(struct crypto_tfm *tfm, const u8 *src, size_t tmp_len = *dlen; size_t __slen = slen; - err = lz4_decompress(src, &__slen, dst, tmp_len); + err = lz4_decompress_unknownoutputsize(src, __slen, dst, &tmp_len); if (err < 0) return -EINVAL; |