mywave82 / opencubicplayer

Open Cubic Player (unix fork). Music visualizer for various tracked music formats (amiga modules, S3M, IT), chiptunes and other formats related to demoscene
https://stian.cubic.org/project-ocp.php
GNU General Public License v2.0
280 stars 19 forks source link

audio/x-lds magic rule is too broad #114

Open atsampson opened 4 months ago

atsampson commented 4 months ago

I've just been trying to work out why gdk-pixbuf's test suite had mysteriously stopped working, and it turned out to be OCP!

The magic rule in desktop/opencubicplayer.xml for audio/x-lds matches any file that starts with byte \x00 or \x01. That means that an awful lot of files in other formats will be spuriously identified by anything using the XDG MIME database as audio/x-lds. For example, several of the images in gdk-pixbuf's test suite happen to start with a 0 or 1 byte - and some image formats nearly always do.

(Edit: the Adlib formats look to be similar - I've just had another image file identified as audio/x-xad-hyp.)

Unless there's a more specific signature for that file format, I suspect it'd be better to just drop that magic rule...

mywave82 commented 4 months ago

I agree that some of the magic matches should be removed, and others probably have their priority lowered.