mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Decompressors: check for write errors in unlzo.c
From: Lasse Collin <lasse.collin@tukaani.org> 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@tukaani.org> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
24bde2170d
commit
1fdb4c9a33
1 file changed
+2
-2
+2
-2
@@ -202,8 +202,8 @@ STATIC int INIT unlzo(u8 *input, unsigned int in_len,
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||