1
0
Fork 0

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>
hifive-unleashed-5.1
Alain Knaff 2009-02-19 13:36:55 -08:00 committed by H. Peter Anvin
parent ee287587da
commit e4aa7ca5a2
1 changed files with 1 additions and 1 deletions

View 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;