[File] [PATCH] of Magdir/fonts for GEM GDOS font (*.fnt *.gft)

Christos Zoulas christos at zoulas.com
Sat Jul 6 19:28:52 UTC 2019


I will disable it too because I've already needed to work around it because of:
https://github.com/file/file/pull/72 <https://github.com/file/file/pull/72>

Best,

christos

> On Jul 6, 2019, at 8:19 AM, Christoph Biedl <astron.com.bwoj at manchmal.in-ulm.de> wrote:
> 
> Jörg Jenderek wrote...
> 
>> Some examples like ROYALK30.GFT have null values for mask fields.
>> This is expressed bv line
>> 62	ulelong		0
>> Unfortunately this is not unique enough, but this is not a problem
>> because identifying and showing parts are separated.
> 
> Even with your additional rules, below, this is *way* to broad.
> 
> My personal rule to avoid mis-detections in libmagic is: A magic pattern
> must probe at least 33 Bits of identifying information before printing
> anything which is the point of no return by design. Comparisons to one
> or more bytes of value zero are not taken into account, since that is
> too common.
> 
> So the very traditional 32 bits identifying magic are not enough, for a
> reason.
> 
> If my calculations are correct, this particular rule set allows, thus
> provides identifying bits:
> 
>    0 Bits from above
> 
>> So i add addition
>> al
>> test lines for such examples. So skip ISO 9660 CD-ROM images with many
>> nulls by looking for low positive font size by line.
>>> 2	uleshort	>2
> 
> 65533 of 2^16 values
>    0.00 Bits
> 
>> Highest size for fonts was 48. So check also for upper limit by line
>>>> 2	uleshort	<49
> 
> 49 of 2^8 values
>    2.3 Bits
> 
>> So skip misidentified DOS 2.0 backup id file like BACKUPID.@@@.
>> At this stage some files like MS Windows icons like "download.ico" are
>> still misidentified. So i also test for valid font name by additional
>> line
>>>>> 4	ubeshort	>0x1F00
> 
> 57600 of 2^16
>    0.19 Bits
> 
> Sum: ~2.5 Bits
> 
> As a result, I get a lot of mis-detections. Please refine that ruleset.
> 
> For the time being I'll disable it in Debian to limit the damage.
> 
>    Christoph
> -- 
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.astron.com/pipermail/file/attachments/20190706/896c6769/attachment.html>


More information about the File mailing list