Last Comment Bug 812932 - ICO files cannot be decoded on (at least some) big endian machines
: ICO files cannot be decoded on (at least some) big endian machines
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: ImageLib (show other bugs)
: 18 Branch
: PowerPC Mac OS X
: -- normal (vote)
: mozilla20
Assigned To: Tobias Netzel
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-18 15:32 PST by Tobias Netzel
Modified: 2012-11-19 22:22 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch against EndianMacros.h (493 bytes, text/plain)
2012-11-18 15:32 PST, Tobias Netzel
no flags Details
Have EndianMacros.h recognize __BIG_ENDIAN__ preprocessor macro (493 bytes, patch)
2012-11-18 15:37 PST, Tobias Netzel
netzen: review+
Details | Diff | Splinter Review

Description Tobias Netzel 2012-11-18 15:32:11 PST
Created attachment 682947 [details]
Patch against EndianMacros.h

User Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/534.50.2 (KHTML, like Gecko) (like Version/6.0 Safari/534.50.2) Roccat/2.8 Roccat/534.50.2

Steps to reproduce:

a) Visit a web site with ICO favicon.
b) Load a ICO file directly into the browser


Actual results:

a) Icon doesn't display
b) "The image "{file path}" cannot be displayed because it contains errors


Expected results:

The image should have been decoded and displayed correctly.
Comment 1 Tobias Netzel 2012-11-18 15:35:04 PST
ICO files cannot be decoded because image/src/EndianMacros.h doesn't recognize big endian architecture if nspr headers aren't included first, at least when building with gcc (version 4.7.2 in this case) on PowerPC Mac OS X.
Comment 2 Tobias Netzel 2012-11-18 15:37:02 PST
Created attachment 682948 [details] [diff] [review]
Have EndianMacros.h recognize __BIG_ENDIAN__ preprocessor macro
Comment 3 Brian R. Bondy [:bbondy] 2012-11-19 07:34:46 PST
Comment on attachment 682948 [details] [diff] [review]
Have EndianMacros.h recognize __BIG_ENDIAN__ preprocessor macro

Looks good, thanks for the patch
Comment 5 Phil Ringnalda (:philor) 2012-11-19 22:22:31 PST
https://hg.mozilla.org/mozilla-central/rev/1326ff4b3398

Note You need to log in before you can comment on or make changes to this bug.