diff options
author | Christos Zoulas <christos@zoulas.com> | 2016-11-08 23:52:10 +0000 |
---|---|---|
committer | Christos Zoulas <christos@zoulas.com> | 2016-11-08 23:52:10 +0000 |
commit | f784bc95740d4370dc2f12bb73b5f295fd61267d (patch) | |
tree | a566f4ebc7de6e0aefc731d92917ed304263c57d | |
parent | 358bbac439073bd5a819d54f21a03185449da0ae (diff) | |
download | file-git-f784bc95740d4370dc2f12bb73b5f295fd61267d.tar.gz |
Harden magic to fix regression:
An old WordPerfect4 files got mis-detected as :
"DOS 2.0 backed up file \313\300, split file, sequence 266"
(Christoph Biedl)
-rw-r--r-- | magic/Magdir/msdos | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/magic/Magdir/msdos b/magic/Magdir/msdos index b7347704..7bc269a3 100644 --- a/magic/Magdir/msdos +++ b/magic/Magdir/msdos @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: msdos,v 1.113 2016/11/07 15:37:29 christos Exp $ +# $File: msdos,v 1.114 2016/11/08 23:52:10 christos Exp $ # msdos: file(1) magic for MS-DOS files # @@ -1136,9 +1136,9 @@ # backed up file # plausibility check for file name length -0x53 ubyte <79 +0x53 ubyte-1 <80 # actually 54 nul bytes ->0x54 string \0\0\0\0\0\0\0\0 +>0x54 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 >>0x5 string x DOS 2.0 backed up file %s, >>0 ubyte 0xff complete file >>0 ubyte !0xff |