From patchwork Fri Sep 21 12:30:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 10427 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:1286:0:0:0:0:0 with SMTP id 6-v6csp119747jap; Fri, 21 Sep 2018 05:31:51 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY4WR3dfuca9gAcmq5pKBUaLiwzBRO7QZy9AJKbGH8IM8fNFZdlvn9Fgg/C6msz7WbuxP2A X-Received: by 2002:adf:fc84:: with SMTP id g4-v6mr19585401wrr.166.1537533111885; Fri, 21 Sep 2018 05:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537533111; cv=none; d=google.com; s=arc-20160816; b=EZ4oOI7jnm8HHpPtk1RuytEQuyK587yOJ2OL12sSMDJkWsDRf+lOy7vgSb4/j+ZS+n 7ZdDdOztfYaiYx0RrXsjw1/1R49yZdkr7imbp68R8CQMsrPv7KsjO6OawvSxO1b54zgL gv9H1rxfiIVDiiE8G4JU6pOmsr/jPsZtdoSBcUJ/s8DfUwfUG/zR5iJdNQkFPTzv7AFO Nf5uxRZt7c9o6pgFryQzLs/umQ9BpJi4faaGjn2mm36NOmDZfb4Vr1AHPsVhIXJ/p0WX dZJttyj3lcxFx1e8cAZe6gHIwsoiavR5Fn4V/vDmP7RWREMbR0SIPlOcSLWKey4Dzlpk 15pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=vs+lsF7YYPjcHngjsInLUrD+thxJP+0Rd36bSRM/cTM=; b=a5Qvv4w0KsS0yddl/Bug10NO2PF5qOSw5ET9m710mvgsLMtB4PfBCEG2p1Ng6auKN7 bhZMzk3pL+DXkF4Q8L1xTsdqbjzMrShsYUk7ZMZPIBID+BWEy3gwmGBT/vGTy8ONmY3x S5zN0tXI3XRHNCrq8t2L8lsoo+fThtnGKwsl473GQa8JXK/gTraAb9nWSgC2TszDde/U auh6MXaW28kaIWETe4QQdYcuC+P0ctFeEnAzpBqK1LdJvQktAlNLezsAYfqfQBLbD8bt Z0fwOfbYB8N58Osu94ftjELtOW84JwqMk1y4sInoJ2HSHVP/ASZx56uDmLPJYUqOszhV xgcg== 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 139-v6si5653806wms.62.2018.09.21.05.31.49; Fri, 21 Sep 2018 05:31:51 -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 DA3D368A723; Fri, 21 Sep 2018 15:31:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe04-1.mx.upcmail.net (vie01a-dmta-pe04-1.mx.upcmail.net [62.179.121.163]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B934F68A69B for ; Fri, 21 Sep 2018 15:31:27 +0300 (EEST) 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 1g3Kaz-0005ev-Kp for ffmpeg-devel@ffmpeg.org; Fri, 21 Sep 2018 14:31:41 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id eCXe1y00B0S5wYM01CXfz0; Fri, 21 Sep 2018 14:31:39 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 21 Sep 2018 14:30:53 +0200 Message-Id: <20180921123053.28534-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/ac3dec: Fix shift signedness in mask creation 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fixes: 9924/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EAC3_fuzzer-5473421772193792 Fixes: left shift of 1 by 63 places cannot be represented in type 'long long' Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/ac3dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index eed8ce5b39..e4d293a2aa 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -1708,7 +1708,7 @@ dependent_frame: int i; for (i = 0; i < 64; i++) { - if ((1LL << i) & ff_eac3_custom_channel_map_locations[ch][1]) { + if ((1ULL << i) & ff_eac3_custom_channel_map_locations[ch][1]) { int index = av_get_channel_layout_channel_index(channel_layout, 1LL << i); if (index < 0)