PNG decode memory leak if PNG corrupt


#1

There’s a problem in the PNG decoding code. If a PNG is corrupt, you’ll get an enormous memory leak and the PNG decoder generates an exception like this “First-chance exception at 0x7c81eb33 in start.exe: Microsoft C++ exception: juce::PNGErrorStruct @ 0x0b8efd97”.
Now it that happens only one time, it’s ok, but if repeated, it can lead to a big memory leak.
Here’s a PNG I’ve encountered this problem with: http://rapidshare.com/files/447332900/56c.png


#2

Ok, thanks, I’ll take a look.