[tip:core/percpu] bzip2/lzma: don't stop search at first unconfigured compression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  e4aa7ca5a2e6d44f07ceb87d9448113f5b48a334
Gitweb:     http://git.kernel.org/tip/e4aa7ca5a2e6d44f07ceb87d9448113f5b48a334
Author:     "Alain Knaff" <alain@xxxxxxxx>
AuthorDate: Thu, 19 Feb 2009 13:36:55 -0800
Commit:     H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
CommitDate: Thu, 19 Feb 2009 13:36:55 -0800

bzip2/lzma: don't stop search at first unconfigured compression

Impact: Bugfix, avoids kernels which build but panic on boot

Fix a bug in decompress.c : only scanned until the first
non-configured compressor (with disastrous result especially if that
was gzip.)

Signed-off-by: Alain Knaff <alain@xxxxxxxx>
Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>


---
 lib/decompress.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/decompress.c b/lib/decompress.c
index 961f367..d2842f5 100644
--- a/lib/decompress.c
+++ b/lib/decompress.c
@@ -43,7 +43,7 @@ decompress_fn decompress_method(const unsigned char *inbuf, int len,
 	if (len < 2)
 		return NULL;	/* Need at least this much... */
 
-	for (cf = compressed_formats; cf->decompressor; cf++) {
+	for (cf = compressed_formats; cf->name; cf++) {
 		if (!memcmp(inbuf, cf->magic, 2))
 			break;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux