diff options
author | Denis Vlasenko | 2008-05-08 15:26:06 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-05-08 15:26:06 +0000 |
commit | a3087ca7495e33b19b122869d17defeb9c933d19 (patch) | |
tree | fa652fe429d78c0b2fad2c42c52c98e92bb3288d /archival/libunarchive/get_header_tar.c | |
parent | 0abe9d96eee3bcdcdd766a863eb711ec004f2f4f (diff) | |
download | busybox-a3087ca7495e33b19b122869d17defeb9c933d19.zip busybox-a3087ca7495e33b19b122869d17defeb9c933d19.tar.gz |
Apply post-1.10.1 patches
Bump version to 1.10.2
Diffstat (limited to 'archival/libunarchive/get_header_tar.c')
-rw-r--r-- | archival/libunarchive/get_header_tar.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index 54c8f76..b1a797a 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c @@ -112,7 +112,7 @@ char get_header_tar(archive_handle_t *archive_handle) archive_handle->offset += 512; /* If there is no filename its an empty header */ - if (tar.name[0] == 0) { + if (tar.name[0] == 0 && tar.prefix[0] == 0) { if (end) { /* This is the second consecutive empty header! End of archive! * Read until the end to empty the pipe from gz or bz2 @@ -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]) { |