Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tar): untar checksum calculation for the pax format #6199

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

BlackAsLight
Copy link
Contributor

Fixes: #6083

After further investigation it seems the problem tarball was using 7 octal digits to encode the checksum instead of 6, like the spec this implementation is based off says to use. Other tar specs don't seem to make any comment on only using 6 octal digits. So for more flexibility this spec just parses the entire 8 bytes instead of the first 6.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.53%. Comparing base (4989ba7) to head (9edfef9).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6199   +/-   ##
=======================================
  Coverage   96.52%   96.53%           
=======================================
  Files         533      533           
  Lines       40871    40871           
  Branches     6120     6120           
=======================================
+ Hits        39451    39455    +4     
+ Misses       1378     1374    -4     
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@BlackAsLight BlackAsLight changed the title fix: untar checksum calculation for the pax format fix(tar): untar checksum calculation for the pax format Nov 21, 2024
@kt3k
Copy link
Member

kt3k commented Nov 21, 2024

Could you add a test case for this fix?

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kt3k kt3k merged commit ca14fef into denoland:main Nov 25, 2024
18 checks passed
@BlackAsLight BlackAsLight deleted the untar_pax_format branch November 25, 2024 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@std/tar: untar_stream fails to extract PAX archives
2 participants