[FFmpeg-devel,2/5] avformat/bintext: Reduce detection for random .bin files as it more likely is not a multimedia related file

Submitted by Michael Niedermayer on May 12, 2018, 4:33 p.m.

Details

Message ID 20180512163329.18380-2-michael@niedermayer.cc
State Accepted
Commit 919e37377a76f63d030d680fcb9506a3f8cc2d62
Headers show

Commit Message

Michael Niedermayer May 12, 2018, 4:33 p.m.
Iam not sure if this is a good idea or not but it may make some
attacks harder. So throwing this out for discussions ...

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/bintext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer May 22, 2018, 10:03 a.m.
On Sat, May 12, 2018 at 06:33:26PM +0200, Michael Niedermayer wrote:
> Iam not sure if this is a good idea or not but it may make some
> attacks harder. So throwing this out for discussions ...
> 
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavformat/bintext.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply this

[...]

Patch hide | download patch | download mbox

diff --git a/libavformat/bintext.c b/libavformat/bintext.c
index f1c0b3e892..0b499d9555 100644
--- a/libavformat/bintext.c
+++ b/libavformat/bintext.c
@@ -163,7 +163,7 @@  static int bin_probe(AVProbeData *p)
 
         if (par.width * par.height * 2 / (8*16) == p->buf_size)
             return AVPROBE_SCORE_MAX / 2;
-        return 1;
+        return 0;
     }
 
     if (sauce)