commons-compress
commons-compress copied to clipboard
Use correct offset when previous entry is a directory.
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.