]> git.baikalelectronics.ru Git - kernel.git/commit
Decompressors: check input size in decompress_unlzo.c
authorLasse Collin <lasse.collin@tukaani.org>
Thu, 13 Jan 2011 01:01:21 +0000 (17:01 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 16:03:24 +0000 (08:03 -0800)
commit743b2ba85ef7dcbf0f2a3dc5662b6e011b72d12e
tree08f0dfe372ebb5db518de2e80c4fb1d7c81f70be
parent4c7cf8c0a9a1600fd089e75ed226b06166cac499
Decompressors: check input size in decompress_unlzo.c

The code assumes that the input is valid and not truncated.  Add checks to
avoid reading past the end of the input buffer.  Change the type of "skip"
from u8 to int to fix a possible integer overflow.

Signed-off-by: Lasse Collin <lasse.collin@tukaani.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Alain Knaff <alain@knaff.lu>
Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/decompress_unlzo.c