Skip to content

Conversation

@krite
Copy link

@krite krite commented Apr 4, 2024

Current implementation cannot read tar-files with folders.
This can easily be tested either by using commons-compress or any other valid tar-tool.
Create a simple folder-structure containing two folders, with a single file in each, create a uncompressed tar-file.
Reading back the file will cause a "Corrupted TAR archive" from TarArchiveEntry:1464, since the incorrect data has been read into the current buffer, it's offset by the previous 'folder-size' too much. The header can thus not be correctly parsed and the code crashes.

@garydgregory
Copy link
Member

Hello @krite
You'll need a unit test and possibly a test fixture to prove this fixes anything and to avoid future regressions.
TY!

@garydgregory
Copy link
Member

@krite
ping.

@garydgregory
Copy link
Member

garydgregory commented Jul 30, 2024

Hello @krite
Do you have a sample file that would cause a new unit test to fail?
Or, can you write a new test using an existing test resource that fails without the change to main?

@garydgregory
Copy link
Member

@krite
ping 😉

@ppkarwasz ppkarwasz self-assigned this Jul 24, 2025
@ppkarwasz
Copy link
Contributor

@garydgregory,

The author is probably no longer active, but I can build on top of this PR.

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.

3 participants