summaryrefslogtreecommitdiff
path: root/archival/unzip.c
diff options
context:
space:
mode:
authorRob Landley2006-05-29 07:42:02 +0000
committerRob Landley2006-05-29 07:42:02 +0000
commit1ec5b2905484b7904aabb01f56c70265fb538c82 (patch)
tree87292bfd7e99ce26b226518e244f4a96914397f9 /archival/unzip.c
parenta6e131dab39ee67522687a56b39ed815b9ae15ec (diff)
downloadbusybox-1ec5b2905484b7904aabb01f56c70265fb538c82.zip
busybox-1ec5b2905484b7904aabb01f56c70265fb538c82.tar.gz
More size shrinkage.
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 0b1e6f9..c6ef9a1 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -275,9 +275,8 @@ int unzip_main(int argc, char **argv)
/* Read filename */
free(dst_fn);
- dst_fn = xmalloc(zip_header.formated.filename_len + 1);
+ dst_fn = xzalloc(zip_header.formated.filename_len + 1);
unzip_read(src_fd, dst_fn, zip_header.formated.filename_len);
- dst_fn[zip_header.formated.filename_len] = 0;
/* Skip extra header bytes */
unzip_skip(src_fd, zip_header.formated.extra_len);