Closed Bug 950293 Opened 11 years ago Closed 11 years ago

The EXIF parser incorrectly rejects little-endian EXIF data

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: seth, Assigned: seth)

References

Details

Attachments

(1 file)

The EXIF parser added to imagelib in bug 869723 incorrectly rejects images taken on little-endian cameras due to a misinterpretation of the spec.

In the TIFF header portion of the EXIF data, the string for determining byte order ("MM" or "II") is followed by a fixed byte sequence "\0*". However, in the little endian case, that byte sequence should be "*\0". When originally writing the parser I wrongly interpreted that sequence as being a sequence of bytes instead of one 16-bit value. Section 4.5.2 of the EXIF spec, however, makes clear that it is a single 16-bit value and thus has to be read according to the requested endianness.
The fix is trivial.

Part 2 will contain a test.
Attachment #8347547 - Flags: review?(tnikkel)
Attachment #8347547 - Flags: review?(tnikkel) → review+
Thanks for the quick review, Timothy!

Pushed:

https://hg.mozilla.org/integration/mozilla-inbound/rev/7a6e310d81ee
https://hg.mozilla.org/mozilla-central/rev/7a6e310d81ee
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Should we uplift this? bug 298619, comment 112 reported this issue in (presumably) release.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: