The image alpha-channel code appears to have serious problems if an image is larger than 32767 pixels; my reading of the code is that it will attempt to allocate a negative amount of memory, which is quite bad. These should be PRUint32's or PRUintn's. Even a GIF can be 64K-1 pixels wide from my reading of the GIF decoder, and other formats almost certainly can be wider. This comment is taken from bug 98252: My only quibble (which is a quibble to the original code, not the patch) is that there's an assumption inherent in the Alpha code (and quite possibly in other code as well) that a row is no more than 32K bytes long - and for 8-bit alpha, that means 32K pixels wide (and no more than 32K pixels high): PRInt16 mAlphaRowBytes; // alpha bytes per row + PRInt16 mTrueAlphaRowBytes; // alpha bytes per row PRInt16 mAlphaWidth; // alpha layer width PRInt16 mAlphaHeight; // alpha layer height
We should address this if possible; this would probably cause either a crash or at least mis-behavior in the face of a very large image (such as high-DPI scans, NASA images, etc). At minimum let's get this in the priority/schedule queue.
Moving bugs to new Image: GFX component
Component: ImageLib → Image: GFX
Tor says this is fixed (X11 may choke but we won't)
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
*** This bug has been marked as a duplicate of 157202 *** *** This bug has been marked as a duplicate of 157202 ***
Resolution: FIXED → DUPLICATE
Status: RESOLVED → VERIFIED
Component: Image: Painting → Image: Painting
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.