diff options
Diffstat (limited to 'lib')
| -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 29c0708cf..f7739bf4c 100644 --- a/lib/decompress.c +++ b/lib/decompress.c @@ -58,8 +58,11 @@ decompress_fn __init decompress_method(const unsigned char *inbuf, int len, { const struct compress_format *cf; - if (len < 2) + if (len < 2) { + if (name) + *name = NULL; return NULL; /* Need at least this much... */ + } for (cf = compressed_formats; cf->name; cf++) { if (!memcmp(inbuf, cf->magic, 2)) |
