]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - crypto/lz4.c
crypto: lz4,lz4hc - fix decompression
authorKOVACS Krisztian <hidden@sch.bme.hu>
Fri, 22 Aug 2014 08:44:35 +0000 (10:44 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 29 Aug 2014 13:46:35 +0000 (21:46 +0800)
commitd801ab204b5a500b66ca285ac7b440cc79933a27
treec85e733e33bf60f21fe018e9529cd12b9479f0ba
parent51269ad2880774e7d46fb1e0edb7a83e15d05d33
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>
crypto/lz4.c
crypto/lz4hc.c