]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
bzip2/lzma: don't stop search at first unconfigured compression
authorAlain Knaff <alain@knaff.lu>
Thu, 19 Feb 2009 21:36:55 +0000 (13:36 -0800)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 19 Feb 2009 21:36:55 +0000 (13:36 -0800)
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>
lib/decompress.c

index 961f367320fc13231d53bfe63df8654370f4ada9..d2842f57167446e0221352035a2276b87318ea4b 100644 (file)
@@ -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;