]> Git Repo - linux.git/commit
Decompressors: check for write errors in decompress_unlzma.c
authorLasse Collin <[email protected]>
Thu, 13 Jan 2011 01:01:18 +0000 (17:01 -0800)
committerLinus Torvalds <[email protected]>
Thu, 13 Jan 2011 16:03:24 +0000 (08:03 -0800)
commit528941ca05734f24a7568c1c082125f2b635c4eb
tree1fb14770f7605c09863175787671217408203c26
parent278208d9d631524d04152574f87b9b88919ce663
Decompressors: check for write errors in decompress_unlzma.c

The return value of wr->flush() is not checked in write_byte().  This
means that the decompressor won't stop even if the caller doesn't want
more data.  This can happen e.g.  with corrupt LZMA-compressed initramfs.
Returning the error quickly allows the user to see the error message
quicker.

There is a similar missing check for wr.flush() near the end of unlzma().

Signed-off-by: Lasse Collin <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Alain Knaff <[email protected]>
Cc: Albin Tonnerre <[email protected]>
Cc: Phillip Lougher <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
lib/decompress_unlzma.c
This page took 0.053357 seconds and 4 git commands to generate.