Possibly Firefox doesn't clear the memory used to draw the image, assuming all will be filled. So different stack or heap values.
It could also be re-using a drawing surface of some sort.
It could also be re-using a drawing surface of some sort.
If that's not right, maybe it's supplying a color table randomly-generated on the fly, but I doubt it's just random memory -- can any random bytes really make up a valid color table? If it were random memory I'd expect crashes or errors, not varying colors.
It's a programming error if they assume the earlier code found an (optional) color table; that's it.
I didn't know the color table was formatted -- kinda obviously, it's just a 3-byte chunk per color, though (i.e., 00ffaa) so any bytes in there will be valid colors... so my original idea that random memory would crash things (by providing an invalid color table) was wrong.