X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fdecompress.c;h=62696dff5730be1927edfdafc7bc314e71226a88;hb=0e1dbccd8f60c1c83d86d693bb87363b7de2319c;hp=528ff932d8e445ae9e19940d4f13cd20c0273bc7;hpb=6b03e32d575917d048875a182bd2dd8924036000;p=karo-tx-linux.git diff --git a/lib/decompress.c b/lib/decompress.c index 528ff932d8e4..62696dff5730 100644 --- a/lib/decompress.c +++ b/lib/decompress.c @@ -59,8 +59,11 @@ decompress_fn __init decompress_method(const unsigned char *inbuf, long len, { const struct compress_format *cf; - if (len < 2) + if (len < 2) { + if (name) + *name = NULL; return NULL; /* Need at least this much... */ + } pr_debug("Compressed data magic: %#.2x %#.2x\n", inbuf[0], inbuf[1]);