The problem: Mozilla can't display some PNGs

Mozilla (under Windows) can't display some PNG images. It has difficulty with fewer of 1% of the PNGs that I've encountered. My hypothesis is that it can't load files that contain an IDAT chunk shorter than a few bytes. (The sample images, below, have IDAT chunks of 1 and 3 bytes, respectively.)

Oddly, in some ways it looks like the bug involves a race condition. Some of the time, the image will partially display, up to some fraction of its height. This is rare -- most of the time Mozilla presents a "broken image" icon instead.

What should have happened

Mozilla should be able to load all valid PNGs.

Evidence

Here are some images from a web comic. The comic is Schlock Mercenary, and working images can be downloaded from the comic's archives.

The first two images don't display in Mozilla under windows. The third image is just a re-formatted version of the second (opened and then saved in an image editor); the re-saving process changed the internal structure of the PNG enough that Mozilla is able to display it.

The last IDAT chunk in this file has a length of 1:
The last IDAT chunk in this file has a length of 3:
The last IDAT chunk in this file has a length of 10:

Update:

November 2002: this bug is fixed. Check bugzilla for details.