Closed tlhackque closed 2 years ago
Hi @tlhackque
I can reproduce the issue with the sample code you provided and the patch does indeed silence the error.
Need to have a think about whether your fix has any unexpected knock-on impacts, but this is an issue that needs fixed
thanks for the very good bug report
Closing issue. Fixed included in b0f93fe62f84b7d4d4bb8d2ea8e6d5432887103f
The recommended mechanism for processing all members of a Zip file is to call
nextStream
at EOF untiil it returns 0 (no more data).If an uncompressed file is passed to such an application, the application doesn't know that the data is uncompressed. So at EOF it calls
nextStream
to see if there's another member.IO::Compress::Unzip isa IO::Uncompress::RawInflate
, whichisa IO::Uncompress::Base
, where thenextStream
method call lands. In turn, it callsIO::Unompress::Base::gotoNextStream
.When
IO::Unompress::Base::gotoNextStream
calls$self->reset()
,reset
's subsequent call to*$self->{Uncomp}->reset()
dies, since*$self->{Uncomp}
is undefined in this case.Demo:
This patch seems to work, at least for this case.