mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-13 13:35:28 +00:00
[PR #1025] [MERGED] Fix ArgumentNullException when disposing RarArchive with damaged archives #1448
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?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/1025
Author: @Copilot
Created: 11/19/2025
Status: ✅ Merged
Merged: 11/19/2025
Merged by: @adamhathcock
Base:
master← Head:copilot/fix-exception-disposing-rararchive📝 Commits (2)
72cf77bInitial plan31f81f3Fix null reference exception in UnpackV1.Unpack.Dispose()📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
src/SharpCompress/Compressors/Rar/UnpackV1/Unpack.cs(+1 -1)📄 Description
When disposing a
RarArchiveafter processing a damaged archive,ArrayPool<byte>.Shared.Return(window)throwsArgumentNullExceptionbecause thewindowfield may be null.Changes
UnpackV1.Unpack.Dispose()before returning the window buffer to the array poolUnpackV2017implementationOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.