lz4: fix another possible overrun
Note: this is the same as 4148c1f 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>
1 parent 918782b commit 9d6df5154284d5909294d7b13195ca41500ff79a
@Holger Schurig Holger Schurig authored on 1 Jul 2014
Sascha Hauer committed on 2 Jul 2014
Showing 1 changed file
View
lib/lz4/lz4_decompress.c