[FFmpeg-devel] [PATCH]lavf/swfdec: Reduce score when auto-detecting swf files

Michael Niedermayer michael at niedermayer.cc
Fri Jan 19 19:51:39 EET 2018


On Thu, Jan 18, 2018 at 09:28:40PM +0100, Carl Eugen Hoyos wrote:
> Hi!
> 
> The probe score for swf files (with uncompressed headers) is currently
> very high after testing a little more than 24bit, attached patch
> reduces the score.

hmm
the first 24 bits are tested and all but 2 values are rejected

thats 23 bits that must match

then 4 values are tested which can be from 1 to 31 bits each
the tests are each either == 0 or != 0 so they are a bit weak
but its at least adding 4 bits that must match and also len
itself has to be smallish so we could argue that this gets us to
about 28 bits
and then buf[3] is checked to be < 20
at this point we need about 32bits to be matching, still not huge but
id think this is stronger than what file extensions prove which are
MAX/2
The test is weakened by using 0 / not 0 / ascii as values though

Have you seen an actual probe failure ?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180119/ed2a646f/attachment.sig>


More information about the ffmpeg-devel mailing list