From patchwork Sat May 12 16:33:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 8930 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:155:0:0:0:0:0 with SMTP id c82-v6csp2130612jad; Sat, 12 May 2018 09:35:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq387P1kECvQud6oKoWACmN9AKgqJJPIgLcu0BvRhMabVfdA23q854piFZ9iCnhwHsTpxUF X-Received: by 2002:a1c:8350:: with SMTP id f77-v6mr1519756wmd.1.1526142916472; Sat, 12 May 2018 09:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526142916; cv=none; d=google.com; s=arc-20160816; b=b61GDKzicOhW1dzI1UqnlD8G/AIwwrktqtteFeJnmbzsZNWpdzVCeQZAFvwuNUuLRW LBbQnB/P8xrv3+d8FtAWRqSU5YvYSoTMGVANkThEgjSrmGP0/zMt4+U/H2fK3q1GVXjg ctTOdDg7TpwQ8qWWUZTzOVrJJ+LV5kMaWq3cdTyxbd/4zdtNXTRkCt5sxi1JB6V5XQaC RjCSK+3Vn68LYrkOHmBG9dC0m986KrtODDoAuHXaL+khn/ehosKpCexu7kMFiWwJhAl2 71KeCCfoBmamVPF/2SpMxVaGWhl9CRLvWLAO+Lchd/L93nyyyqQZVlluRontUOFMo57v 4Jfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=wQhr4Qz6pnhBQo5Mnx04bSKC+vRmvxwjlh3Ty14SSZI=; b=zUdeNPAhLfm/xY6NYLybmE/uQopCam1lUrXssbaEo07Vgw7cIMfQhXwkZRgzQK1IQ0 DsQg91Ub3n0wdtdG4AsL6xmuhmmnXu0aoCMKa6/LwZ8O9Ukn6C63Abf3AHohIhIRSWfo qVpRgF7weeUYUOL89UPidKNZ3HfAju8AU+csR1m86qYU3IGakJLgHcTRIt9C+gtFKqX2 iebz0uXtEuh+yGkZolkp0Xgbj3cxcs9xB636NN/YwOTZqnC+ey0kNRSP6+uaott9Wu5R TwpCT+EmhoQQv2VD6xgSB9g2blmu7q+rYeVm3wNBxfgTU6VzVPdJnX2sBjS4jd6NAAIV 1rwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 195-v6si2612568wma.225.2018.05.12.09.35.16; Sat, 12 May 2018 09:35:16 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 184CA68A733; Sat, 12 May 2018 19:34:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-3.mx.upcmail.net (vie01a-dmta-pe03-3.mx.upcmail.net [62.179.121.162]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7B400689CA0 for ; Sat, 12 May 2018 19:34:25 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1fHXU5-0001Cy-V9 for ffmpeg-devel@ffmpeg.org; Sat, 12 May 2018 18:35:01 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id lUav1x01o0S5wYM01Uawcl; Sat, 12 May 2018 18:34:56 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 12 May 2018 18:33:26 +0200 Message-Id: <20180512163329.18380-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180512163329.18380-1-michael@niedermayer.cc> References: <20180512163329.18380-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 2/5] avformat/bintext: Reduce detection for random .bin files as it more likely is not a multimedia related file X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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 --- libavformat/bintext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)