[Prev] Thread [Next]  |  [Prev] Date [Next]

[Fish-users] BUG: mimedb hangs on certain XML mime files James Reeves Mon Jul 28 00:03:26 2008

(I tried sending this mail before, but it doesn't seem to have gone
through, so I'll send it again and hopefully it'll reach the mailing
list this time.)

The mimedb application will hang when it encounters a certain type of
XML mime file. Here's an example of a file that screws up mimedb on
the latest release of fish:

<?xml version="1.0" encoding="utf-8"?>
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info"
 <!--Created automatically by update-mime-database. DO NOT EDIT!-->
 <sub-class-of type="application/x-executable"/>
 <sub-class-of type="text/plain"/>
 <comment xml:lang="en_GB">Ruby script</comment>
 <comment>Ruby XML Template</comment>

If I were to save that under /usr/share/mime/application/x-ruby.xml,
and then run "mimedb -d .rb", the task would hang.

The problem seems to be the ending <comment>, which doesn't have a
xml:lang attribute. If this comment is removed, or if the
language-less comment is placed *before* the en_GB comment, then
everything's fine. I'd guess it's a problem with the regular
expressions in mimedb.c


This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Fish-users mailing list