Prior99 / node-libpng

Unofficial bindings for node to libpng.
MIT License
19 stars 11 forks source link

Process crashing when loading this PNG image #23

Open Agamnentzar opened 4 years ago

Agamnentzar commented 4 years ago

Crashes when loading this PNG using readPngFile, probably need to update libpng to latest version.

Platform: Windows 10

Exception code=0xc0000005 flags=0x0 at 0x00007FFB873E5420. Access violation - attempting to read data at address 0x0000025A63466000

image: fail

Prior99 commented 4 years ago

Hi, I upgraded libpng to 1.6.37, but this still fails. I added a simple regression test with your image on this branch. But the upgrade did not fix this issue. What version of libpng was used to encode this image?

Agamnentzar commented 4 years ago

I got this image set to my website by random user, they must have used some broken encoding program. I did have someone try latest libpng and it indeed failed to decode this image. I think the latest libpng at least doesn't crash on it though. Not sure what is used by browsers to decode it successfully.