Skip to content

Commit ad76949

Browse files
authored
Merge pull request #684 from onekey-sec/683-fix-sparse-tar
improve tar handler to support sparse archives.
2 parents 41004be + 2b5a2fa commit ad76949

File tree

6 files changed

+16
-2
lines changed

6 files changed

+16
-2
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:217eb921a851ca38185b7585a554160f2f88f76c3b123c1930468a2cc4d80e46
3+
size 10240
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:16fa66a7dc98d93f2a4c5d20baf5177f59c4c37fc62face65690c11c15fe6ff9
3+
size 51200
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:16fa66a7dc98d93f2a4c5d20baf5177f59c4c37fc62face65690c11c15fe6ff9
3+
size 51200
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:ed68b430af3630fde9b598ea74340a7be809408e493f3adff7aadbd6cfeef931
3+
size 45
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:ed68b430af3630fde9b598ea74340a7be809408e493f3adff7aadbd6cfeef931
3+
size 45

unblob/handlers/archive/tar.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ def _get_end_of_last_tar_entry(file) -> int:
5959
if last_member is None:
6060
return -1
6161

62-
last_file_size = round_up(last_member.size, BLOCK_SIZE)
63-
end_of_last_tar_entry = last_member.offset_data + last_file_size
62+
end_of_last_tar_entry = tf.offset
6463
try:
6564
file.seek(end_of_last_tar_entry)
6665
except SeekError:

0 commit comments

Comments
 (0)