Bug 608922 - mono debuginfo files (*.mdb) sometimes mis-detected
Summary: mono debuginfo files (*.mdb) sometimes mis-detected
Alias: None
Product: Fedora
Classification: Fedora
Component: file   
(Show other bugs)
Version: 13
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact: Fedora Extras Quality Assurance
: 608919 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-28 22:34 UTC by Christian Krause
Modified: 2010-07-07 17:54 UTC (History)
1 user (show)

Fixed In Version: file-5.04-5.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-07-07 17:54:09 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
file to demonstrate the issue (11.90 KB, application/octet-stream)
2010-06-28 22:35 UTC, Christian Krause
no flags Details
z-machine magic entry update (1.05 KB, patch)
2010-06-29 08:33 UTC, Jan Kaluža
no flags Details | Diff

Description Christian Krause 2010-06-28 22:34:56 UTC
Description of problem:
mono debuginfo files (*.mdb) are sometimes misdetected as "Infocom game data" and "file" exits with a return value != 0

Version-Release number of selected component (if applicable):

How reproducible:
- the issue does not happen for all mono debuginfo files, but for some of them
- even a consecutive re-compilation will change the output of the file command
- however, if a file contains the problematic byte sequence, "file" will always file
- I have attached a file showing the problem (Banshee.Dap.MassStorage.dll.mdb)

Steps to Reproduce:
1. LANG=en_US.utf8 file Banshee.Dap.MassStorage.dll.mdb
Actual results:
- "Banshee.Dap.MassStorage.dll.mdb: ERROR: Infocom game data (Z-machine 20, Release 32765 / vasprintf failed (Invalid or incomplete multibyte or wide character)"
- return code != 0

Expected results:
- correct detection
- return code == 0

Additional info:
Regardless whether "file" can correctly identify a file type, I'm really surprised that just arbitrary file _content_ can lead to a non-zero return code. Would it be worth to start a discussion about this general behaviour with upstream?

Comment 1 Christian Krause 2010-06-28 22:35:37 UTC
Created attachment 427521 [details]
file to demonstrate the issue

Comment 2 Christian Krause 2010-06-28 22:38:11 UTC
*** Bug 608919 has been marked as a duplicate of this bug. ***

Comment 3 Jan Kaluža 2010-06-29 08:33:59 UTC
Created attachment 427607 [details]
z-machine magic entry update

I confirm the error. Attached patch fix that for me.

Comment 4 Fedora Update System 2010-07-01 14:31:07 UTC
file-5.04-5.fc13 has been submitted as an update for Fedora 13.

Comment 5 Fedora Update System 2010-07-05 22:02:45 UTC
file-5.04-5.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update file'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/file-5.04-5.fc13

Comment 6 Fedora Update System 2010-07-07 17:54:00 UTC
file-5.04-5.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

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