summaryrefslogtreecommitdiffstats
path: root/lib/lz4
Commit message (Collapse)AuthorAgeFilesLines
* lz4: fix another possible overrunHolger Schurig2014-07-021-1/+3
| | | | | | | | | | | | | | | | | | | | Note: this is the same as 4148c1f67abf823099b2d7db6851e4aea407f5ee in linux-git. There is one other possible overrun in the lz4 code as implemented by Linux at this point in time (which differs from the upstream lz4 codebase, but will get synced at in a future kernel release.) As pointed out by Don, we also need to check the overflow in the data itself. While we are at it, replace the odd error return value with just a "simple" -1 value as the return value is never used for anything other than a basic "did this work or not" check. Reported-by: "Don A. Bailey" <donb@securitymouse.com> Reported-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Holger Schurig <holgerschurig@gmail.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lz4: ensure length does not wrapHolger Schurig2014-07-021-0/+2
| | | | | | | | | | | | | Note: this is the same as 206204a1162b995e2185275167b22468c00d6b36 in linux-git. Given some pathologically compressed data, lz4 could possibly decide to wrap a few internal variables, causing unknown things to happen. Catch this before the wrapping happens and abort the decompression. Reported-by: "Don A. Bailey" <donb@securitymouse.com> Signed-off-by: Holger Schurig <holgerschurig@gmail.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lib: Add support for LZ4-compressed kernelKyungsik Lee2013-07-162-1/+3
| | | | | | | | | | | | This patch adds support for extracting LZ4-compressed kernel images, as well as LZ4-compressed ramdisk images in the kernel boot process. This depends on the patch below decompressor: Add LZ4 decompressor module Signed-off-by: Kyungsik Lee <kyungsik.lee@lge.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* decompressor: Add LZ4 decompressor moduleKyungsik Lee2013-07-162-0/+482
This patch adds support for LZ4 decompression in the Linux Kernel. LZ4 Decompression APIs for kernel are based on LZ4 implementation by Yann Collet. LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html LZ4 source repository : http://code.google.com/p/lz4/ Signed-off-by: Kyungsik Lee <kyungsik.lee@lge.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>