9.44 KB, image/bmp
388 bytes, text/html
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 Firefox renders some malformed bitmaps as white boxes, instead of reporting an error. Some malformed bitmaps can be rendered. For example, Firefox won't panic if one of the "reserved" header fields is set to 1 instead of 0. This bug concerns images that cannot possible be rendered. For example, if the entire file is just a single byte 'B', or if the "biCompression" field is 0xFFFFFFFF. Other malformed bitmaps of this sort generate a useful diagnostic like a page that says: The image "file:///badimage.bmp” cannot be displayed, because it contains errors. Or a broken image icon if its an inline image. I assume this is the desired result. I have reproduced the same problem in Mozilla 1.8b1. Reproducible: Always Steps to Reproduce: 1. Load "compression-unknown.bmp" from disk in Firefox. Or: 1. Create an HTML page that renders the image with the inline IMG tag. Put this IMG tag inside a hyperlink so that you can see a border around the image. 2. Load that page in Firefox. Actual Results: For the first repro scenario, you see a blank white page. For the second repro, you see a 320x240 white box inside a blue border (the hyperlink). Expected Results: For the first repro, you should see a page that says: The image "file:///compression-unknown.bmp” cannot be displayed, because it contains errors. For the second repro, you should see a page with a small broken image icon inside a blue border. I am currently generating a test suite of bitmaps and I decided to use them to test Mozilla. I have found a few different classes of malformed bitmap files that show the same symptom. If you like, I can attach them or, or I can file separate bugs on them. However, I don't want to waste server space or QA's time if these would all be considered duplicates.
Created attachment 178699 [details] compression-unknown.bmp -- a bitmap with a compression field of 0xFFFFFFFE This is a bitmap with a compression field of 0xFFFFFFFE. There are shorter/simpler bitmap files that have the same symptoms. I chose this one because I have found that Firefox will display a diagnostic for other bitmaps with a malformed compression field. For example, Firefox displays a useful diagnostic when a bitmap file has a bitdepth of 8 and a compression field of BI_RLE4, which is a malformed compression field for the given bitdepth (or a malformed bitdepth field for a given compression field--depending on how it's coded up).
Created attachment 178701 [details] mozilla-bug287882-repro.html -- a repro using IMG tags This is HTML that demonstrates the second repro scenario. It has an inline image tag that link to attachment 178699 [details].
The correct behaviour here is debatable. While I agree that displaying a message about wrong format would be good for all cases where something in the BMP image is wrong, I think it's a nice behaviour to show a placeholder with the determined image size.
This is an automated message, with ID "auto-resolve01". This bug has had no comments for a long time. Statistically, we have found that bug reports that have not been confirmed by a second user after three months are highly unlikely to be the source of a fix to the code. While your input is very important to us, our resources are limited and so we are asking for your help in focussing our efforts. If you can still reproduce this problem in the latest version of the product (see below for how to obtain a copy) or, for feature requests, if it's not present in the latest version and you still believe we should implement it, please visit the URL of this bug (given at the top of this mail) and add a comment to that effect, giving more reproduction information if you have it. If it is not a problem any longer, you need take no action. If this bug is not changed in any way in the next two weeks, it will be automatically resolved. Thank you for your help in this matter. The latest beta releases can be obtained from: Firefox: http://www.mozilla.org/projects/firefox/ Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html Seamonkey: http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above comment). If anyone thinks this is incorrect, they should feel free to reopen it.