X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=libbb%2Funarchive.c;fp=libbb%2Funarchive.c;h=6edb5b673bd4a484ee2fddbb6f15f3da28a7a3c0;hb=19070b6c1a9718bf7ceaa61c48f328cabf1d5ca7;hp=08f50bf6f1f56717e9dcff75ab0adb4f7916181f;hpb=758527e6e714fa077445a6f9f12b5e0a295d2af8;p=project%2Fopkg-lede.git diff --git a/libbb/unarchive.c b/libbb/unarchive.c index 08f50bf..6edb5b6 100644 --- a/libbb/unarchive.c +++ b/libbb/unarchive.c @@ -529,7 +529,7 @@ char *deb_extract(const char *package_filename, FILE * out_stream, char *ared_file = NULL; char ar_magic[8]; int gz_err; - struct gzip_handle tar_outer, tar_inner; + struct gzip_handle tar_outer = { }, tar_inner = { }; file_header_t *tar_header; ssize_t len; @@ -561,7 +561,6 @@ char *deb_extract(const char *package_filename, FILE * out_stream, /* set the buffer size */ setvbuf(deb_stream, NULL, _IOFBF, 0x8000); - memset(&tar_outer, 0, sizeof(tar_outer)); tar_outer.file = deb_stream; gzip_exec(&tar_outer, NULL); @@ -572,7 +571,6 @@ char *deb_extract(const char *package_filename, FILE * out_stream, name_offset = 2; if (strcmp(ared_file, tar_header->name + name_offset) == 0) { - memset(&tar_inner, 0, sizeof(tar_inner)); tar_inner.gzip = &tar_outer; gzip_exec(&tar_inner, NULL);