bitbank2 / unzipLIB

An embedded-friendly library for decompressing files from zip archives
Apache License 2.0
52 stars 11 forks source link

exception on invalid zip #8

Closed Adrianotiger closed 1 year ago

Adrianotiger commented 1 year ago

Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited). Exception was unhandled.

I zipped the file with gzip and got this exception. After debugging a while, I saw that the handler is not closed correctly if the zip is invalid.

There is also a problem with the int as parameter. On some cpus this is a 16-bit number and so you cast the size to int16 (max size 32kb). In the internal library it is already uint32_t, so I changed also the type on the class.

bitbank2 commented 1 year ago

Looks good, thank you.