Bug 608922

Summary: mono debuginfo files (*.mdb) sometimes mis-detected
Product: [Fedora] Fedora Reporter: Christian Krause <chkr>
Component: fileAssignee: Jan Kaluža <jkaluza>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: jkaluza
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: file-5.04-5.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-07 17:54:09 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 Flags
file to demonstrate the issue
none
z-machine magic entry update none

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):
file-5.04-4.fc13.i686

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.
http://admin.fedoraproject.org/updates/file-5.04-5.fc13

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.