Bug 214718
| Summary: | file reports that a file is MS-DOS executable (COM) file is actually a japanese email | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Ethan Sommer <sommere> | ||||||
| Component: | file | Assignee: | Martin Bacovsky <mbacovsk> | ||||||
| Status: | CLOSED NOTABUG | QA Contact: | |||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 6 | ||||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | i386 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2007-01-26 11:11:35 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Ethan Sommer
2006-11-08 23:28:44 UTC
Created attachment 140728 [details]
the beginning of an e-mail in japanese
Hopefully I cleared out any sensitive info in the e-mail. (I don't read
Japanese)
File at first tries to match given file to patterns stored in magic dictionary. If it was not successfull file tries to examine given file and guess it type from various indices. After fc2 there was added pattern for "DOS executable (COM)". This pattern is one byte long and matches beginning of the file. Unfortunately, in your message the first character's code (鈴) is represented by the same byte and the pattern matches. Since we have to find matching patterns first, this is not bug. If you have to solve this problem - you can use file's mimetype recognition $ file -i /tmp/test.txt /tmp/test.txt: text/plain; charset=utf-8 - you can disable the pattern in pattern db by commenting out theese lines in /usr/share/file/magic 0 byte 0xe9 DOS executable (COM) >0x1FE leshort 0xAA55 \b, boot code >6 string SFX\ of\ LHarc (%s) and then by running rm magic.mgc;file -C in /usr/share/file (as root) - or by building your file with following patch If you need some help feel free to reopen this bug. Created attachment 146673 [details]
Patch to disable COM detection
This patch disables DOS executable (COM) detection.
|