matomo-org / component-decompress

Decompress files
GNU Lesser General Public License v3.0
12 stars 12 forks source link

Gzip::extract stuck in an endless loop #24

Closed Jakovitz closed 1 day ago

Jakovitz commented 2 weeks ago

I managed to download a corrupt .gz file, in which case fread() returns false at some point. This results in an endless loop (using 100% of one core), since the eof will never be reached.

I'm not sure if the same issue exists with bzip.

sgiehl commented 3 days ago

@Jakovitz I've tried to create a fix for this in https://github.com/matomo-org/component-decompress/pull/25 Would you mind checking if that solves the problem for your corrupted file?

Jakovitz commented 1 day ago

Would you mind checking if that solves the problem for your corrupted file?

It did solve it.