diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-29 03:54:16 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-29 03:54:16 +0000 |
commit | d93400bffb363463739ef7d4f63fb4b9a7a99a35 (patch) | |
tree | 3c515abb1b01ea41ea901668763af8853429e5c6 | |
parent | c450379ff02edbda5fc6225b8c96634c47c35ce0 (diff) | |
download | busybox-w32-d93400bffb363463739ef7d4f63fb4b9a7a99a35.tar.gz busybox-w32-d93400bffb363463739ef7d4f63fb4b9a7a99a35.tar.bz2 busybox-w32-d93400bffb363463739ef7d4f63fb4b9a7a99a35.zip |
tar: fix the case where long base names can be ignored
-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 beaf3087f..9134d6db6 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) | |||
211 | /* getOctal trashes subsequent field, therefore we call it | 211 | /* getOctal trashes subsequent field, therefore we call it |
212 | * on fields in reverse order */ | 212 | * on fields in reverse order */ |
213 | if (tar.devmajor[0]) { | 213 | if (tar.devmajor[0]) { |
214 | char t = tar.prefix[0]; | ||
215 | /* we trash prefix[0] here, but we DO need it later! */ | ||
214 | unsigned minor = GET_OCTAL(tar.devminor); | 216 | unsigned minor = GET_OCTAL(tar.devminor); |
215 | unsigned major = GET_OCTAL(tar.devmajor); | 217 | unsigned major = GET_OCTAL(tar.devmajor); |
216 | file_header->device = makedev(major, minor); | 218 | file_header->device = makedev(major, minor); |
219 | tar.prefix[0] = t; | ||
217 | } | 220 | } |
218 | file_header->link_target = NULL; | 221 | file_header->link_target = NULL; |
219 | if (!linkname && parse_names && tar.linkname[0]) { | 222 | if (!linkname && parse_names && tar.linkname[0]) { |