From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id CEF6042509 for ; Thu, 17 Mar 2022 23:41:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6DF3268AFB1; Fri, 18 Mar 2022 01:40:58 +0200 (EET) Received: from mail-oo1-f45.google.com (mail-oo1-f45.google.com [209.85.161.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7006C689EA6 for ; Fri, 18 Mar 2022 01:40:52 +0200 (EET) Received: by mail-oo1-f45.google.com with SMTP id h16-20020a4a6f10000000b00320507b9ccfso8383812ooc.7 for ; Thu, 17 Mar 2022 16:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=glB0TykyCXvE2GFltSrhlh0r6eWNbh9lOE50OTf+FhM=; b=mMCJYeLtiP5qCnixmSiDeae0Q5aMw6QNmZoiCBJpjYiIIa588ID9gtucQGOcvDx4zk fFYvg1pe64avm5xVlR6mJl3S8fzrMLa5UCjNQIMjXJ8jkzde33UL4g95iAVavOd1W3Ge FV39NeoRnG9oIoWdUlvKyDatSkYXti629ixvin/BUZ5cZdtXkHD9zhCDMZg0Nj6qR4mU +52Q2CmnNa9T6cqPdocICIodM74m/tjrIVnogWJI5pVcTD3dm1V7T1+P4f/GCfdNGb+8 zUfTrRfWOxs7JUWTZxHFFYRQdOWJojjRYYG3MRxcHhrMKbsFM0CjZ07d/2Xh5ftQurEh /e/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=glB0TykyCXvE2GFltSrhlh0r6eWNbh9lOE50OTf+FhM=; b=OSnK2O5QjuI3tv8oGzqUIxfOHaAXvMvbCv/eKq7KaSTwwL3koQhA9IUf40kmAwHnqq RF/Y0/AVYqXldR5RvfWD9q3ng76yxh07ZCexRcTkZ67r/EL1r/MBIsMuSFvfPoDBeEkj IAsv+WWCsIb0wps3DNyDIPJ751qOsoO1hkUGVvbDrGNbytAKUyvleo9ce4yNwiaWvGZ/ vcIUMOk0u3tmKu6I0Ky2xoUDq+o4fvuMX+MecQcJ2DNqpZtGIT+Hzd0gQoacoe+uQvL0 cLbe/r4+a8UQk+xUbr5AmlucnNbYeYpO6KRkl+yjMnLPEJ/JThm6eGEfcbJcvli71VGU cuHA== X-Gm-Message-State: AOAM5332BoPqKZKk1Uxai+d+cgpG2MiMVK8NOY1txG88LgSsA1GT4Vuc JvyZI0b4l/KiQLGgWMTeeJQcaTSiOMXr1A== X-Google-Smtp-Source: ABdhPJwV1JWt3BXnPi8S312+qrjgtW4RdGGSFhG/5rhp4+h9FKFnv4DkTOPj5Va+338HrGZDOIM54Q== X-Received: by 2002:a05:6870:a188:b0:da:cecb:8c2f with SMTP id a8-20020a056870a18800b000dacecb8c2fmr6373135oaf.247.1647560450319; Thu, 17 Mar 2022 16:40:50 -0700 (PDT) Received: from [192.168.0.13] ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id j4-20020a9d7384000000b005b23499b66dsm3111236otk.23.2022.03.17.16.40.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Mar 2022 16:40:49 -0700 (PDT) Message-ID: Date: Thu, 17 Mar 2022 20:40:48 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220317233019.12049-1-michael@niedermayer.cc> <20220317233019.12049-3-michael@niedermayer.cc> From: James Almer In-Reply-To: <20220317233019.12049-3-michael@niedermayer.cc> Subject: Re: [FFmpeg-devel] [PATCH 3/3] avcodec/alsdec: Set channels from data after data is set X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 3/17/2022 8:30 PM, Michael Niedermayer wrote: > Fixes: out of array write > Fixes: 45624/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-6473487382872064 > Fixes: 45626/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-4874997192065024 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/alsdec.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c > index 822cf211b0..73af829178 100644 > --- a/libavcodec/alsdec.c > +++ b/libavcodec/alsdec.c > @@ -1986,7 +1986,7 @@ static av_cold int decode_init(AVCodecContext *avctx) > unsigned int c; > unsigned int channel_size; > int num_buffers, ret; > - int channels = avctx->ch_layout.nb_channels; > + int channels; > ALSDecContext *ctx = avctx->priv_data; > ALSSpecificConfig *sconf = &ctx->sconf; > ctx->avctx = avctx; > @@ -2000,6 +2000,7 @@ static av_cold int decode_init(AVCodecContext *avctx) > av_log(avctx, AV_LOG_ERROR, "Reading ALSSpecificConfig failed.\n"); > return ret; > } > + channels = avctx->ch_layout.nb_channels; > > if ((ret = check_specific_config(ctx)) < 0) { > return ret; LGTM _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".