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

[BUG] Crash when extracting file with hardlink to itself #398

Closed
0xE1E10 opened this issue Dec 15, 2023 · 1 comment
Closed

[BUG] Crash when extracting file with hardlink to itself #398

0xE1E10 opened this issue Dec 15, 2023 · 1 comment

Comments

@0xE1E10
Copy link

0xE1E10 commented Dec 15, 2023

See devcontainers/cli#699 for details

/workspaces/cli/dist/spec-node/devContainersSpecCLI.js:6107
        return paths.every((q) => q[0] === fn) && dirs.every((q) => q[0] instanceof Set && q[0].has(fn));
                                   ^

TypeError: Cannot read properties of undefined (reading '0')

Root cause: devcontainers/cli#699 (comment)

Why do we have these?

This happens if a file is specified multiple times indirectly by the directory when it is created. libarchive/libarchive#1381 (comment) Apparently both GNU tar and libarchive just ignore this kind of silly links instead of fixing the problem. It's stupid but might want to do the same for compatibility.

@isaacs
Copy link
Owner

isaacs commented Apr 10, 2024

Verified that in v7, this is just a warning, not a crash.

isaacs added a commit that referenced this issue Apr 10, 2024
@isaacs isaacs closed this as completed Apr 10, 2024
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

No branches or pull requests

2 participants