]> git.baikalelectronics.ru Git - kernel.git/commit
Decompressors: validate match distance in decompress_unlzma.c
authorLasse Collin <lasse.collin@tukaani.org>
Thu, 13 Jan 2011 01:01:19 +0000 (17:01 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 16:03:24 +0000 (08:03 -0800)
commit4c1f206cf00c2255bb98427e6e3106d4108b9aae
treefb7eabafd37cdddee9c082bb29844474699f6a8f
parent7b9284b812a67192c28cfbf9fee2d1a2daf26e9e
Decompressors: validate match distance in decompress_unlzma.c

Validate the newly decoded distance (rep0) in process_bit1().  This is to
detect corrupt LZMA data quickly.  The old code can run for long time
producing garbage until it hits the end of the input.

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_unlzma.c