Null reference when doing lzip.close #284

Closed
opened 2026-01-29 22:09:30 +00:00 by claunia · 3 comments
Owner

Originally created by @claunia on GitHub (Mar 17, 2018).

Originally assigned to: @adamhathcock on GitHub.

Well, self descriptive, with 0.19.2, both on compression and decompression modes.

Originally created by @claunia on GitHub (Mar 17, 2018). Originally assigned to: @adamhathcock on GitHub. Well, self descriptive, with 0.19.2, both on compression and decompression modes.
claunia added the bug label 2026-01-29 22:09:30 +00:00
Author
Owner

@adamhathcock commented on GitHub (Mar 18, 2018):

Need a little more detail. Probably a code sample. The tests so exercise the Dispose method like here: https://github.com/adamhathcock/sharpcompress/blob/master/tests/SharpCompress.Test/Tar/TarReaderTests.cs#L65

@adamhathcock commented on GitHub (Mar 18, 2018): Need a little more detail. Probably a code sample. The tests so exercise the Dispose method like here: https://github.com/adamhathcock/sharpcompress/blob/master/tests/SharpCompress.Test/Tar/TarReaderTests.cs#L65
Author
Owner

@claunia commented on GitHub (Mar 18, 2018):

The null reference happens exactly in https://github.com/adamhathcock/sharpcompress/blob/master/src/SharpCompress/Compressors/LZMA/LZipStream.cs#L92 and well, it happens because rawStream is only initialized in compress mode, while in decompress it stays null.

@claunia commented on GitHub (Mar 18, 2018): The null reference happens exactly in https://github.com/adamhathcock/sharpcompress/blob/master/src/SharpCompress/Compressors/LZMA/LZipStream.cs#L92 and well, it happens because rawStream is only initialized in compress mode, while in decompress it stays null.
Author
Owner

@adamhathcock commented on GitHub (May 5, 2018):

Fixed

@adamhathcock commented on GitHub (May 5, 2018): Fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#284