mirage / ocaml-tar

Pure OCaml library to read and write tar files
ISC License
54 stars 34 forks source link

Test parsing of various tar formats (with pax Global Extended Headers) #115

Closed MisterDA closed 1 year ago

MisterDA commented 1 year ago

Add a cram test exhibiting a parsing problem with git archive generated tarballs.

Fatal error: exception Tar.Header.Checksum_mismatch
Raised at Tar.Header.unmarshal in file "lib/tar.ml", line 378, characters 35-58
Called from Tar.HeaderReader.read.next_block.(fun) in file "lib/tar.ml", line 536, characters 13-45
Called from Tar.HeaderReader.read.get_hdr in file "lib/tar.ml", line 546, characters 6-13
Called from Tar.HeaderReader.read in file "lib/tar.ml", line 606, characters 4-14
Called from Tar_gz.Make.get_next_header in file "lib/tar_gz.ml", line 127, characters 4-36
Called from Dune__exe__Otar.list.go in file "bin/otar.ml", line 107, characters 24-49
Called from Dune__exe__Otar in file "bin/otar.ml", line 124, characters 4-17
[2]

working on a fix (help is appreciated).

See #113.

MisterDA commented 1 year ago

Oups, incorrectly closed this!