Decompressors: check input size in unlzo.c
authorLasse Collin <lasse.collin@tukaani.org>
Fri, 11 Nov 2011 13:35:51 +0000 (14:35 +0100)
committerLasse Collin <lasse.collin@tukaani.org>
Fri, 11 Nov 2011 13:35:51 +0000 (14:35 +0100)
commite774c4ed457466e0dd85cb9a20679fea79fb8958
tree15dc8026909e024e16d9012503559a3f4a1bc89f
parent1fdb4c9a338713db7abda4dbe81fb09d61e16699
Decompressors: check input size in unlzo.c

From: Lasse Collin <lasse.collin@tukaani.org>

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>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/common/unlzo.c