thejoshwolfe / yauzl

yet another unzip library for node
MIT License
681 stars 77 forks source link

Replace custom Stream.destroy() methods with inherited ones #123

Closed ncroese closed 4 months ago

ncroese commented 3 years ago

Node 8 introduced base destroy/_destroy methods for streams. The custom implementation is swallowing errors, so this pull request removes the custom implementations to make use of the default inherited ones.

BillyONeal commented 3 years ago

I note that with the default validateEntrySizes: true setting, attempting to parse a malformed zip (like the wrong-entry-sizes.zip in the tests here) causes Node to hang (because the error generated by AssertByteCountStream._flush is not propagated correctly).

thejoshwolfe commented 4 months ago

This should be fixed in yauzl 3.0.0. Let me know if you run into any issues.