diff options
Diffstat (limited to 'lib/decompress.c')
-rw-r--r-- | lib/decompress.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/decompress.c b/lib/decompress.c index 528ff932d..62696dff5 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]); |