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

Support long symbolic/hard link path name by reading the linkpath PAX extension

Merged
merged 1 commit into from Jul 12, 2021

Conversation

nullpo-head
Copy link
Contributor

@nullpo-head nullpo-head commented Jul 6, 2021

Fix a problem where tar-rs crashes if a symbolic link or hard link in a pax-format archive refers to a path that was longer than 99 characters.

For a new test case, I've updated the pax2.tar so that it includes a symbolic link and a hard link.
Before:

1. aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/

After

1. aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/
2. aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/ccccccccccccccc
3. aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/bbbbbbbbbbbbbbb
4. bbbbbbbbbbbbbbb -> aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/bbbbbbbbbbbbbbb
5. ccccccccccccccc link to aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/aaaaaaaaaaaaaaa/ccccccccccccccc

@alexcrichton alexcrichton merged commit 6fa206d into alexcrichton:master Jul 12, 2021
7 checks passed
@alexcrichton
Copy link
Owner

alexcrichton commented Jul 12, 2021

Thanks!

@frederikbosch
Copy link

frederikbosch commented Jul 28, 2021

Does this fix #221?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants