summaryrefslogtreecommitdiff
path: root/archival/libunarchive
diff options
context:
space:
mode:
authorDenis Vlasenko2008-04-15 01:17:50 +0000
committerDenis Vlasenko2008-04-15 01:17:50 +0000
commitbc1918a7a278195709387fc586dbbf5a56867364 (patch)
tree6dd40b7c0e01bd8ab75ca7622aee1e6cd277ede4 /archival/libunarchive
parent3cfebe44c7c7814e22362712b46f00b5636d0716 (diff)
downloadbusybox-bc1918a7a278195709387fc586dbbf5a56867364.zip
busybox-bc1918a7a278195709387fc586dbbf5a56867364.tar.gz
trivial fixes to make bbox compile with gcc 4.3.0
Diffstat (limited to 'archival/libunarchive')
-rw-r--r--archival/libunarchive/get_header_tar.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index 54c8f76..beaf308 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -217,9 +217,7 @@ char get_header_tar(archive_handle_t *archive_handle)
}
file_header->link_target = NULL;
if (!linkname && parse_names && tar.linkname[0]) {
- /* we trash magic[0] here, it's ok */
- tar.linkname[sizeof(tar.linkname)] = '\0';
- file_header->link_target = xstrdup(tar.linkname);
+ file_header->link_target = xstrndup(tar.linkname, sizeof(tar.linkname));
/* FIXME: what if we have non-link object with link_target? */
/* Will link_target be free()ed? */
}
@@ -237,10 +235,12 @@ char get_header_tar(archive_handle_t *archive_handle)
file_header->name = NULL;
if (!longname && parse_names) {
/* we trash mode[0] here, it's ok */
- tar.name[sizeof(tar.name)] = '\0';
+ //tar.name[sizeof(tar.name)] = '\0'; - gcc 4.3.0 would complain
+ tar.mode[0] = '\0';
if (tar.prefix[0]) {
/* and padding[0] */
- tar.prefix[sizeof(tar.prefix)] = '\0';
+ //tar.prefix[sizeof(tar.prefix)] = '\0'; - gcc 4.3.0 would complain
+ tar.padding[0] = '\0';
file_header->name = concat_path_file(tar.prefix, tar.name);
} else
file_header->name = xstrdup(tar.name);