diff options
author | Denis Vlasenko | 2008-04-29 03:54:16 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-04-29 03:54:16 +0000 |
commit | d93400bffb363463739ef7d4f63fb4b9a7a99a35 (patch) | |
tree | 3c515abb1b01ea41ea901668763af8853429e5c6 /archival/libunarchive | |
parent | c450379ff02edbda5fc6225b8c96634c47c35ce0 (diff) | |
download | busybox-d93400bffb363463739ef7d4f63fb4b9a7a99a35.zip busybox-d93400bffb363463739ef7d4f63fb4b9a7a99a35.tar.gz |
tar: fix the case where long base names can be ignored
Diffstat (limited to 'archival/libunarchive')
-rw-r--r-- | archival/libunarchive/get_header_tar.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index beaf308..9134d6d 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c @@ -211,9 +211,12 @@ char get_header_tar(archive_handle_t *archive_handle) /* getOctal trashes subsequent field, therefore we call it * on fields in reverse order */ if (tar.devmajor[0]) { + char t = tar.prefix[0]; + /* we trash prefix[0] here, but we DO need it later! */ unsigned minor = GET_OCTAL(tar.devminor); unsigned major = GET_OCTAL(tar.devmajor); file_header->device = makedev(major, minor); + tar.prefix[0] = t; } file_header->link_target = NULL; if (!linkname && parse_names && tar.linkname[0]) { |