diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-25 23:47:32 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-25 23:47:32 +0000 |
commit | 87cd4a87e3f98dd5a1b982cfdfc4dad6800ca010 (patch) | |
tree | ba572c8880643df14a9803c30fd710ec8f9feedf /archival/libunarchive | |
parent | 43bddf31e95080abf7232952da9064207636f47b (diff) | |
download | busybox-w32-87cd4a87e3f98dd5a1b982cfdfc4dad6800ca010.tar.gz busybox-w32-87cd4a87e3f98dd5a1b982cfdfc4dad6800ca010.tar.bz2 busybox-w32-87cd4a87e3f98dd5a1b982cfdfc4dad6800ca010.zip |
tar: small fix and small optimization
Diffstat (limited to 'archival/libunarchive')
-rw-r--r-- | archival/libunarchive/get_header_tar.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index a49081f40..b785d631d 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c | |||
@@ -152,9 +152,11 @@ char get_header_tar(archive_handle_t *archive_handle) | |||
152 | if (!longname && parse_names) { | 152 | if (!longname && parse_names) { |
153 | /* we trash mode[0] here, it's ok */ | 153 | /* we trash mode[0] here, it's ok */ |
154 | tar.name[sizeof(tar.name)] = '\0'; | 154 | tar.name[sizeof(tar.name)] = '\0'; |
155 | if (tar.prefix[0]) | 155 | if (tar.prefix[0]) { |
156 | /* and padding[0] */ | ||
157 | tar.prefix[sizeof(tar.prefix)] = '\0'; | ||
156 | file_header->name = concat_path_file(tar.prefix, tar.name); | 158 | file_header->name = concat_path_file(tar.prefix, tar.name); |
157 | else | 159 | } else |
158 | file_header->name = xstrdup(tar.name); | 160 | file_header->name = xstrdup(tar.name); |
159 | } | 161 | } |
160 | 162 | ||