mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
TarHeaderFactory Infinite loop #563
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Ilanlido on GitHub (Mar 24, 2023).
A possible Infinite loop can occur,
Let's look at https://github.com/adamhathcock/sharpcompress/blame/master/src/SharpCompress/Common/Tar/TarHeaderFactory.cs#L51
When the stream that is being used has been closed - for example if the connection was cut, it will keep throw an IOException inside https://github.com/adamhathcock/sharpcompress/blame/master/src/SharpCompress/Common/Tar/TarHeaderFactory.cs#L24
And then and infinite loop of nulls will be here
https://github.com/adamhathcock/sharpcompress/blob/master/src/SharpCompress/Common/Tar/TarEntry.cs#L62