1 --- a/archival/libunarchive/get_header_tar.c
2 +++ b/archival/libunarchive/get_header_tar.c
5 #if ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY
6 if (last_char_is(file_header->name, '/')) {
7 - file_header->mode |= S_IFDIR;
12 file_header->mode |= S_IFREG;
15 file_header->mode |= S_IFLNK;
16 + /* have seen tarballs with size field containing
17 + * the size of the link target's name */
19 + file_header->size = 0;
22 file_header->mode |= S_IFCHR;
24 + goto size0; /* paranoia */
26 file_header->mode |= S_IFBLK;
30 +#if ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY
33 file_header->mode |= S_IFDIR;
37 file_header->mode |= S_IFIFO;
40 #if ENABLE_FEATURE_TAR_GNU_EXTENSIONS
42 /* free: paranoia: tar with several consecutive longnames */
43 --- a/archival/libunarchive/seek_by_jump.c
44 +++ b/archival/libunarchive/seek_by_jump.c
47 void seek_by_jump(const archive_handle_t *archive_handle, unsigned amount)
49 - if (lseek(archive_handle->src_fd, (off_t) amount, SEEK_CUR) == (off_t) -1) {
51 + && lseek(archive_handle->src_fd, (off_t) amount, SEEK_CUR) == (off_t) -1
54 seek_by_read(archive_handle, amount);