[FFmpeg-devel] [PATCH]lavf/swfdec: Reduce score when auto-detecting swf files
Michael Niedermayer
michael at niedermayer.cc
Fri Jan 19 19:33:42 EET 2018
On Fri, Jan 19, 2018 at 04:21:54PM +0100, Tomas Härdin wrote:
> On 2018-01-18 21:28, 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.
> >
> >Please comment, Carl Eugen
>
> Would be consistent with the discussion about .c2 files. Could we document
> this in avformat.h? Something like:
>
> // Score should be no more than AVPROBE_SCORE_MAX * identifying_bits/64
> // if the number of identifying "magic" bits are less than 64
this is a bit oversimplifying it i think
its more a question of "entropy" than bits
24bits tested for at one location is much stronger than 24 bits found at any
location in 20mb. (later is in fact close to telling us nothing)
If we want to define a limit then one way we might define it somehow based
on how often a large random input would cause probe to trigger with that or a
higher score.
(this is also testable)
Care has to be taken that this works with existing probe functions.
It would be bad if a rule is added that when followed breaks existing
probe code or doesnt interoperate well with it
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- 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/dfd5186a/attachment.sig>
More information about the ffmpeg-devel
mailing list