Bug 1507

Summary: value endianness isn't taken into account when writing the mask for a magic pattern to disk
Product: shared-mime-info Reporter: Christophe Fergeau <teuf>
Component: generalAssignee: Jonathan Blandford <jrb>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: seb128
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: proposed fix

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.