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

Tar: support GNU numeric format. #101172

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Tar: support GNU numeric format. #101172

wants to merge 4 commits into from

Conversation

tmds
Copy link
Member

@tmds tmds commented Apr 17, 2024

The tar specification stores numeric fields using an octal representation. This limits the range of values that can be stored.

To increase the supported range, a GNU extension defines that when the leading byte is 0xff/0x80 the remaining bytes are a negative/positive big endian formatted value.

When writing under the PAX format, we continue to only use the only octal representation in the header fields. The values are overridden using extended attributes.

Fixes #93763.

@dotnet/area-system-formats-tar ptal.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 17, 2024
The tar specification stores numeric fields using an octal representation.
This limits the range of values that can be stored.

To increase the supported range, a GNU extension defines that when
the leading byte is 0xff/0x80 the remaining bytes are a
negative/positive big endian formatted value.

When writing under the PAX format, we continue to only use the
only octal representation in the header fields. The values are
overridden using extended attributes.
@tmds
Copy link
Member Author

tmds commented Apr 17, 2024

Test failures are unrelated.

@tmds
Copy link
Member Author

tmds commented Apr 29, 2024

@dotnet/area-system-formats-tar ptal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Formats.Tar community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TarReader throws on archive that other tools accept
1 participant