lzo: properly check for overruns
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Jun 2014 05:00:53 +0000 (22:00 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jun 2014 19:12:41 +0000 (15:12 -0400)
commitfeaad01723471c67e10f5c5bc537299e686f78b8
tree4e26e9df7cea8cbf50f5215d2ea022e456cf8ed8
parenta6e3a4df4c6888337dcbfce8b831c98cd3c886a4
lzo: properly check for overruns

commit 206a81c18401c0cde6e579164f752c4b147324ce upstream.

The lzo decompressor can, if given some really crazy data, possibly
overrun some variable types.  Modify the checking logic to properly
detect overruns before they happen.

Reported-by: "Don A. Bailey" <donb@securitymouse.com>
Tested-by: "Don A. Bailey" <donb@securitymouse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/lzo/lzo1x_decompress_safe.c