Skip to content

Conversation

plamentotev
Copy link
Member

To encode the symbolic links AbstractZipArchiver uses
ZipEncoding but it does not use it properly.
It uses the whole backing array of the returned ByteBuffer
while it it should use it only up to the buffer limit.
This may lead to additional characters at the end of the
symbolic link.

This does not manifest as a bug because Common Compress up to 1.14
returns a ByteBuffer that wraps a byte array containing the
encoded payload. But Common Compress 1.15 returns new
implementation and we need to fix it before upgrading.
Actually that is how it was found.

To encode the symbolic links `AbstractZipArchiver` uses
`ZipEncoding` but it does not use it properly.
It uses the whole backing array of the returned ByteBuffer
while it it should use it only up to the buffer limit.
This may lead to additional characters at the end of the
symbolic link.

This does not manifest as a bug because Common Compress up to 1.14
returns a ByteBuffer that wraps a byte array containing the
encoded payload. But Common Compress 1.15 returns new
implementation and we need to fix it before upgrading.
Actually that is how it was found.
@michael-o michael-o self-assigned this Oct 21, 2017
@michael-o michael-o added the bug label Oct 21, 2017
@michael-o michael-o added this to the 3.6 milestone Oct 21, 2017
@michael-o michael-o closed this in cbbc266 Oct 21, 2017
@plamentotev plamentotev deleted the fix-symlinks-encoding branch February 16, 2018 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants