diff options
Diffstat (limited to 'archival/libunarchive/get_header_tar.c')
-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 | ||