Bug 1507 - value endianness isn't taken into account when writing the mask for a magic pattern to disk
Summary: value endianness isn't taken into account when writing the mask for a magic p...
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-01 04:28 UTC by Christophe Fergeau
Modified: 2004-11-25 19:13 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
proposed fix (569 bytes, patch)
2004-10-01 04:29 UTC, Christophe Fergeau
Details | Splinter Review

Description Christophe Fergeau 2004-10-01 04:28:54 UTC
When update-mime-database reads a magic pattern from freedesktop.org.xml, it
takes into account the value of the "type" tag when it parses the "value" tag to
generate a value with the wanted endianness
However, when the "mask" tag is being read, the endianness specified in "type"
isn't taken into account. This leads to unnatural behaviour with patterns like:
<match value="0x0000081a" type="little32" offset="0" mask="0x8080ffff"/>
where value is matched as a little endian value, but is masked with "mask" taken
as a big endian value.
Comment 1 Christophe Fergeau 2004-10-01 04:29:35 UTC
Created attachment 989 [details] [review]
proposed fix
Comment 2 Christophe Fergeau 2004-11-26 14:13:26 UTC
Patch commtited to CVS.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.