aboutsummaryrefslogtreecommitdiff
path: root/archival/unzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/unzip.c')
-rw-r--r--archival/unzip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/archival/unzip.c b/archival/unzip.c
index 0b1e6f997..c6ef9a183 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -275,9 +275,8 @@ int unzip_main(int argc, char **argv)
275 275
276 /* Read filename */ 276 /* Read filename */
277 free(dst_fn); 277 free(dst_fn);
278 dst_fn = xmalloc(zip_header.formated.filename_len + 1); 278 dst_fn = xzalloc(zip_header.formated.filename_len + 1);
279 unzip_read(src_fd, dst_fn, zip_header.formated.filename_len); 279 unzip_read(src_fd, dst_fn, zip_header.formated.filename_len);
280 dst_fn[zip_header.formated.filename_len] = 0;
281 280
282 /* Skip extra header bytes */ 281 /* Skip extra header bytes */
283 unzip_skip(src_fd, zip_header.formated.extra_len); 282 unzip_skip(src_fd, zip_header.formated.extra_len);