Skip to content

Commit

Permalink
bzip2/lzma: don't stop search at first unconfigured compression
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alain Knaff authored and H. Peter Anvin committed Feb 19, 2009
1 parent ee28758 commit e4aa7ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/decompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e4aa7ca

Please sign in to comment.