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:17:36 +0000 (15:17 -0400)
commit0cd8f4b67f78f0b85b019ecfeb6e3ca7a28c109f
treef161bc155d4d843fd128af3f2ebc6f80a927e499
parent5999ec53f60b270adf0a59edb63043fe60bc3464
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