[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Decompressors: check for write errors in unlzo.c
# HG changeset patch # User Lasse Collin <lasse.collin@xxxxxxxxxxx> # Date 1321018505 -3600 # Node ID 276db7ceeb5d5f4ac47a1ed83c3574cb46d7aa84 # Parent 88347644935e4de008e16daa13d10d11b0e726d3 Decompressors: check for write errors in unlzo.c From: Lasse Collin <lasse.collin@xxxxxxxxxxx> The return value of flush() is not checked in unlzo(). This means that the decompressor won't stop even if the caller doesn't want more data. This can happen e.g. with a corrupt LZO-compressed initramfs image. Signed-off-by: Lasse Collin <lasse.collin@xxxxxxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> Committed-by: Jan Beulich <jbeulich@xxxxxxxx> --- diff -r 88347644935e -r 276db7ceeb5d xen/common/unlzo.c --- a/xen/common/unlzo.c Fri Nov 11 14:34:24 2011 +0100 +++ b/xen/common/unlzo.c Fri Nov 11 14:35:05 2011 +0100 @@ -202,8 +202,8 @@ } } - if (flush) - flush(out_buf, dst_len); + if (flush && flush(out_buf, dst_len) != dst_len) + goto exit_2; if (output) out_buf += dst_len; if (posp) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |