From patchwork Sat Feb 17 23:34:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 7635 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.150.1 with SMTP id c1csp2273249jai; Sat, 17 Feb 2018 15:34:29 -0800 (PST) X-Google-Smtp-Source: AH8x224zfm6DUQY2D8fMLE5P4U8ZMP20IAvPB6sazxf62ztX/3Ll/tBHkVceOQoF4kzpa6NJ0yqi X-Received: by 10.223.170.73 with SMTP id q9mr8786523wrd.110.1518910469205; Sat, 17 Feb 2018 15:34:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518910469; cv=none; d=google.com; s=arc-20160816; b=ng72ZTJp1sjWon8rm2IrIjWASsKeLurS80o7bkPxuVpTCC8OYn7J9v+9Fklye5/KBF 1CD8Px/xQuAsOd08V8XsBdv0z5rmyXQgY6ymmnk//busSI4o21SD2OV/if3Xb89IItUy ++oQsW1oGE6aq6t6thn/N4TEZOEP8ql/IveKUBGF2OlZB2jib6Z+s9gdckalsax8BHzt N2SijbFXUKkdiJ3dev89yr3HQo1ui/Ry9ruv6nuizeyHoBTYwQ3Ba6I3fPU3vP0hjAAB X+x3ojJJqEsZ9s4UIPlf9hQqpzPOoK1BNmWBxllpuLFZfX62CsCGpZovFg2fm8A1cWG3 QWig== 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:message-id:date:to:from:delivered-to :arc-authentication-results; bh=F1GqtPSEeEgYaOoo1o2qER7omYR2jEiBtekuK3xBBeo=; b=AmS5pOoYW9Ffd3yMObar6922JgYKjmNIIP6i+AzXB64fILdgNxemCUl7KTUqVr2dPt xwy/CvuGhHpoagIJqKxd25RT+8rCdmYOKfk0OCjEcmC4vRUDPANl5CEH36pCRDraMMYb pILTX3QiGQ9GpVqSWNwghSZavmwnlzvaMJCWBHl/xDgJvS1PA/hXsslv42X3MKgiUHHO PtTVxfQDtkY/qZmPCFlEdDQ9drSvrwIgu/Ak25mUzxthrlJZRCPjIvMqsYrYNhn3t07I FKTmLgyRPUzFGgPGe8WTjNzBwD/BHBZdYr1qLA/g0nFvgdY5Hlt5YS+ctr040XD/DJWE 7yxg== 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 u17si11709200wmu.270.2018.02.17.15.34.26; Sat, 17 Feb 2018 15:34:29 -0800 (PST) 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 DDAA8689A33; Sun, 18 Feb 2018 01:34:24 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe04-2.mx.upcmail.net (vie01a-dmta-pe04-2.mx.upcmail.net [62.179.121.164]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 56E17689923 for ; Sun, 18 Feb 2018 01:34:18 +0200 (EET) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe04.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1enBzl-0005uD-IQ for ffmpeg-devel@ffmpeg.org; Sun, 18 Feb 2018 00:34:17 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id BzaC1x00Z0S5wYM01zaDeF; Sun, 18 Feb 2018 00:34:13 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 18 Feb 2018 00:34:10 +0100 Message-Id: <20180217233411.3703-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.16.1 Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/diracdec: Use int64 in global mv to prevent overflow 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" Fixes: runtime error: signed integer overflow: 361 * -6295541 cannot be represented in type 'int' Fixes: 5911/clusterfuzz-testcase-minimized-6450382197751808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/diracdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index 530e1c6ffd..e3afbf14be 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -1399,8 +1399,8 @@ static void global_mv(DiracContext *s, DiracBlock *block, int x, int y, int ref) int *c = s->globalmc[ref].perspective; int m = (1<u.mv[ref][0] = (mx + (1<<(ez+ep))) >> (ez+ep); block->u.mv[ref][1] = (my + (1<<(ez+ep))) >> (ez+ep);