commons-compress icon indicating copy to clipboard operation
commons-compress copied to clipboard

Use correct offset when previous entry is a directory.

Open krite opened this issue 10 months ago • 3 comments

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.

krite avatar Apr 04 '24 11:04 krite