You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now I am struggling to write a reproducing example, but I had Tar.Header.marshal buf hdr which produced a new checksum every time even if the file was the same. Then I rewrote it to Tar.Hheader.marshal (Cstruct.sub buf 0 Tar.Header.length) hdr and the checksum was correct. It was a very long buffer with some random data near the end. It seems the header checksum is computed over the whole buffer, but we should only consider the first 512 bytes (the actual header).
This was observed in tar.2.6.0, but it seems it's an issue with main branch judging from the source code.
The text was updated successfully, but these errors were encountered:
This is also an issue in Tar.Header.unmarshal on 2.6.0. In main branch we check the input buffer is Tar.Header.length long and thus does not allow this behavior.
Now I am struggling to write a reproducing example, but I had
Tar.Header.marshal buf hdr
which produced a new checksum every time even if the file was the same. Then I rewrote it toTar.Hheader.marshal (Cstruct.sub buf 0 Tar.Header.length) hdr
and the checksum was correct. It was a very long buffer with some random data near the end. It seems the header checksum is computed over the whole buffer, but we should only consider the first 512 bytes (the actual header).This was observed in tar.2.6.0, but it seems it's an issue with main branch judging from the source code.
The text was updated successfully, but these errors were encountered: