SharpCompress 0.28.0 throws StackOverflowException when extracting an AES encrypted zip #437

Closed
opened 2026-01-29 22:12:03 +00:00 by claunia · 1 comment
Owner

Originally created by @Kim-SSi on GitHub (Feb 18, 2021).

SharpCompress 0.28.0 throws a StackOverflowException when extracting an AES encrypted zip.
0.27.1 works fine.
Running on .NET 4.8.

Screenshots showing the StackOverflowException and callstack.
In image 5: _index and buffers.Length both = 50.
1
2
3
4
5

Reproducer.sln with 2 projects showing plain and AES zip file extraction on 0.28.0 and 0.,27.1.
Reproducer.zip

Callstack:
callstack.txt

Originally created by @Kim-SSi on GitHub (Feb 18, 2021). SharpCompress 0.28.0 throws a StackOverflowException when extracting an AES encrypted zip. 0.27.1 works fine. Running on .NET 4.8. Screenshots showing the StackOverflowException and callstack. In image 5: _index and buffers.Length both = 50. ![1](https://user-images.githubusercontent.com/28267812/108303959-d6ddd100-720b-11eb-80b8-44c65f584768.png) ![2](https://user-images.githubusercontent.com/28267812/108303962-d80efe00-720b-11eb-8d23-833d30e8b56d.png) ![3](https://user-images.githubusercontent.com/28267812/108303966-d8a79480-720b-11eb-88a9-f510d9b0488d.png) ![4](https://user-images.githubusercontent.com/28267812/108303967-d9402b00-720b-11eb-87d5-b59204a95b85.png) ![5](https://user-images.githubusercontent.com/28267812/108303969-d9d8c180-720b-11eb-964d-617be3ddd22e.png) Reproducer.sln with 2 projects showing plain and AES zip file extraction on 0.28.0 and 0.,27.1. [Reproducer.zip](https://github.com/adamhathcock/sharpcompress/files/6000163/Reproducer.zip) Callstack: [callstack.txt](https://github.com/adamhathcock/sharpcompress/files/6000192/callstack.txt)
Author
Owner

@adamhathcock commented on GitHub (Feb 18, 2021):

Thanks for reporting this. Fixed here 020f862814

Releasing fix in 0.28.1

@adamhathcock commented on GitHub (Feb 18, 2021): Thanks for reporting this. Fixed here https://github.com/adamhathcock/sharpcompress/commit/020f8628145bc2361bef885ea4650d6636861659 Releasing fix in 0.28.1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#437