aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/unarchive.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/unarchive.c b/libbb/unarchive.c
index a17f7af50..067e78b84 100644
--- a/libbb/unarchive.c
+++ b/libbb/unarchive.c
@@ -538,7 +538,8 @@ char *deb_extract(const char *package_filename, FILE *out_stream,
int gunzip_pid;
if (filename == NULL) {
- file_list = NULL;
+ file_list = xmalloc(sizeof(char *));
+ file_list[0] = NULL;
} else {
file_list = xmalloc(sizeof(char *) * 3);
file_list[0] = xstrdup(filename);