[File] [PATCH] Magdir/database misidentifies LX*.OUT as FoxPro FPT with invalid block size

Christos Zoulas christos at zoulas.com
Sat Feb 26 17:42:32 UTC 2022


Committed, thanks!

christos

> On Feb 21, 2022, at 8:44 AM, Jörg Jenderek <joerg.jen.der.ek at gmx.net> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> 
> some days ago i handled some samples with file name extension OUT.
> 
> When running file command version 5.41 on such examples and related
> real FPT examples i get an output like:
> 
> LXMDALG4.OUT:  FoxPro FPT, blocks size 170,
> 	       next free block index 455770112, field type 0
> LXMDCLN4.OUT:  FoxPro FPT, blocks size 170,
> 	       next free block index 455770112, field type 0
> LXMDCLN6.OUT:  FoxPro FPT, blocks size 170,
> 	       next free block index 455770112, field type 0
> NG.FPT:        FoxPro FPT, blocks size 256,
> 	       next free block index 432, field type 1,
> 	       field length 48, 1st item
> 	       "386 registers 1993 - Pavel Machek (PMK software)"
> test-pic.FPT:  FoxPro FPT, blocks size 64,
> 	       next free block index 34, field type 0
> vFoxpro-8.FPT: FoxPro FPT, blocks size 64,
> 	       next free block index 2410, field type 2
> vFoxpro.FPT:   FoxPro FPT, blocks size 64,
> 	       next free block index 15, field type 1,
> 	       field length 8, 1st item
> 	       "1st memo"
> 
> The OUT examples are found beneath sub directory FileRepository on
> a Vista Windows system. So i knew that identification as FPT is wrong
> .
> 
> Unfortunately the FoxPro FPT have no characteristic magic pattern,
> but luckily the displaying part is done by sub routine
> foxpro-memo-print inside Magdir/database. After file name extension
> line the block size is shown by line like:
>> 6		ubeshort	x		\b, blocks size %u
> For real FPT examples i get here values like 64 or 256. Obviously
> for performance reasons a higher multiple of two is used. For the
> misidentified OUT examples i get here value 170 (=0xAA). That is
> apparently nonsense. So i add one additional test for that
> condition before calling the sub routine. So this now becomes like:
> 
>>>>>>>>>>>>> 6	ubeshort&0x002f	0
>>>>>>>>>>>>>> 0	use		foxpro-memo-print
> 
> After applying the above mentioned modifications by patch
> file-5.41-database-fpt.diff then all FPT inspected examples are now
> described as before, but the misidentification vanish. This now
> looks like:
> LXMDALG4.OUT:  data
> LXMDCLN4.OUT:  data
> LXMDCLN6.OUT:  data
> NG.FPT:        FoxPro FPT, blocks size 256,
> 	       next free block index 432, field type 1,
> 	       field length 48, 1st item
> 	       "386 registers 1993 - Pavel Machek (PMK software)"
> test-pic.FPT:  FoxPro FPT, blocks size 64,
> 	       next free block index 34, field type 0
> vFoxpro-8.FPT: FoxPro FPT, blocks size 64,
> 	       next free block index 2410, field type 2
> vFoxpro.FPT:   FoxPro FPT, blocks size 64,
> 	       next free block index 15, field type 1,
> 	       field length 8, 1st item
> 	       "1st memo"
> 
> I hope my diff file can be applied in future version of file
> utility.
> 
> With best wishes
> Jörg Jenderek
> - --
> Jörg Jenderek
> 
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
> 
> iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCYhOXUAAKCRCv8rHJQhrU
> 1tPmAJ4/AEaIvZ2BdsP2RRueGTlYnH5sPgCgluFJJ1V0FhJOYrAWUeF01MobdRE=
> =Bise
> -----END PGP SIGNATURE-----
> <file-5_41-database-fpt_diff.DEFANGED-0><file-5_41-database-fpt_diff_sig.DEFANGED-1>--
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20220226/33fdb2ca/attachment.asc>


More information about the File mailing list