TarHeaderFactory Infinite loop #563

Open
opened 2026-01-29 22:13:48 +00:00 by claunia · 0 comments
Owner

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

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
claunia added the bugup for grabs labels 2026-01-29 22:13:48 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#563