Message ID | 20240720005241.726089-2-michael@niedermayer.cc |
---|---|
State | New |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a742:0:b0:482:c625:d099 with SMTP id f2csp894123vqm; Fri, 19 Jul 2024 17:53:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXUqy8/5QaJhmNr+hK6jPwMcBbJdrVXOObkOJXCwh8CD4CRR/ZR/i7LqZPZCFgL5Zst0J5F3LkzH39WkOZ0VWvifKEflkTk/L/S4w== X-Google-Smtp-Source: AGHT+IGZtyaWGL+lNS1+oBGhWySeF/VhohRkxEr8f2WlTMizcxr13eHZ9MWLDHfAnP8G7Y7Vo6u8 X-Received: by 2002:a17:907:72c9:b0:a6f:5120:3a30 with SMTP id a640c23a62f3a-a7a4c44902cmr7435066b.60.1721436785246; Fri, 19 Jul 2024 17:53:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721436785; cv=none; d=google.com; s=arc-20160816; b=NIfKzQsP1ZatQlZXu3Uz5VdaFJU7m0MqpCknrI2IHQRt1LWNHy+R2Hri6kkELRdpZM utr7QmMk/KWOgT1gJ0qo5ebYcTn9yWfkcbeIPGTj99w9Hzur2q/HjnM0bdnAl8Y5yk2Y N944VTHbCzWWq1F7ci7jCgkrRTlCw+rO80knWPsQOqxCMOY0YOgCKPBPB7IDF/pcSrzu Wj3PZDEzXUrQ1bR7SiIrpVzvt+b5d0XDQWw9pb7VbT0VYZnOf+MFkiKPPKvmT5NjNYuT fTDa8E9Z7/v0mL8LANu6DUsUfTAcTwajeiF38Ic/CMc3sF3NRmhq6axnDB8np0Se+Vf/ NaeA== 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:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=HJo+ViZpzFL04M8jnCgCIxeJoW+vq0zFEkeSJ9I1pQM=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=YwJ97QhTBT4IAir3uqKyR8+qDSlLtm0CcVIsGYPAPSDyf8G94LayXnjpxds1HNXKo5 ITOuXqhtTFSaeQg6VwCCn1+IdhwFQkubTYQvj1L66PlT5xrHM3Jqa2i5m2FELNXMiotW 3JJUrELYuhEIYcfs17RGsnKIApOCGCoN0WLNkCUv782Qv6lSPXmg8OVs6iEKFJ6iLrze ENfYn7W+IUi0m7EOZ8phG97ICdCudeRdelqZaETnLWTBMwcMF0V7d6vtxQ1sgCm25m7Q fj6+hEwNO/RYgedgo0cocAKetCfLUdi1xZrkQCAO56K0iPfC2+ETQuK/jaIk38jvrhq7 lngQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=ntiiD+5r; 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: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a7a3c954b45si85647166b.848.2024.07.19.17.53.04; Fri, 19 Jul 2024 17:53:05 -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; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=ntiiD+5r; 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 899D368D980; Sat, 20 Jul 2024 03:52:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 55A5868D849 for <ffmpeg-devel@ffmpeg.org>; Sat, 20 Jul 2024 03:52:44 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 84834E0002 for <ffmpeg-devel@ffmpeg.org>; Sat, 20 Jul 2024 00:52:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1721436763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zQIobQm6ahS0WwAa986Ua4+0x7TzxWxqlXAoOcOONZw=; b=ntiiD+5rJx3MXBxf88NLXz8clqbpTlBHJKOz8c9KaBtvg+9czPLcEz9DeRf2Wj/bXZsVZe /PbJ49Q3jHcYTHij8bETCBl5iKFS31xw1uXixDWw27qzi3v8gDwhSynJNLPi5rNbAgwW/B nnHsOjRz/TX5CQHnOe95sa/l7pOTuTnG+s43Max9MlF97c93h51RO5sZuqfqmp6diErhlo /UE7CFh9HoG3toBGnZMyzasaZS9arv740H8FxuAuIAQSmecqyQszMj0v63sahkx7z0IEqO bsbtZHsPUjM97kWjyC/cNdbqpZtK6UfhOG/eEJE3InEpR2pzdq8vYOUmRlFtVA== From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Date: Sat, 20 Jul 2024 02:52:32 +0200 Message-ID: <20240720005241.726089-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240720005241.726089-1-michael@niedermayer.cc> References: <20240720005241.726089-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 02/11] avcodec/proresdec: Consider negative bits left X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: lp8R9kNhNrtX |
Series |
[FFmpeg-devel,01/11] avcodec/alsdec: Clear shift_value
|
expand
|
diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c index ec1d0bd0be9..6a256107b49 100644 --- a/libavcodec/proresdec.c +++ b/libavcodec/proresdec.c @@ -511,7 +511,7 @@ static av_always_inline int decode_ac_coeffs(AVCodecContext *avctx, GetBitContex for (pos = block_mask;;) { bits_left = gb->size_in_bits - re_index; - if (!bits_left || (bits_left < 32 && !SHOW_UBITS(re, gb, bits_left))) + if (bits_left <= 0 || (bits_left < 32 && !SHOW_UBITS(re, gb, bits_left))) break; DECODE_CODEWORD(run, run_to_cb[FFMIN(run, 15)], LAST_SKIP_BITS);
Fixes: 70036/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_fuzzer-6298797647396864 Fixes: shift exponent 40 is too large for 32-bit type 'uint32_t' (aka 'unsigned int') Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/proresdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)