diff options
author | Alain Knaff <alain@knaff.lu> | 2009-02-19 16:36:55 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2009-02-19 16:36:55 -0500 |
commit | e4aa7ca5a2e6d44f07ceb87d9448113f5b48a334 (patch) | |
tree | 30e15661f17b6810c10782b1f37732a82f5303a4 /lib | |
parent | ee287587dafd77fd211e50637561224605c214b4 (diff) |
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@knaff.lu>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/decompress.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/decompress.c b/lib/decompress.c index 961f367320fc..d2842f571674 100644 --- a/lib/decompress.c +++ b/lib/decompress.c | |||
@@ -43,7 +43,7 @@ decompress_fn decompress_method(const unsigned char *inbuf, int len, | |||
43 | if (len < 2) | 43 | if (len < 2) |
44 | return NULL; /* Need at least this much... */ | 44 | return NULL; /* Need at least this much... */ |
45 | 45 | ||
46 | for (cf = compressed_formats; cf->decompressor; cf++) { | 46 | for (cf = compressed_formats; cf->name; cf++) { |
47 | if (!memcmp(inbuf, cf->magic, 2)) | 47 | if (!memcmp(inbuf, cf->magic, 2)) |
48 | break; | 48 | break; |
49 | 49 | ||