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 7ABFB49B63 for ; Tue, 2 Apr 2024 22:22:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DB47668CFD9; Wed, 3 Apr 2024 01:22:33 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5A9D668C444 for ; Wed, 3 Apr 2024 01:22:27 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id B8F68E9D83 for ; Wed, 3 Apr 2024 00:22:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mQef8KE22wu8 for ; Wed, 3 Apr 2024 00:22:24 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 1582EE9B66 for ; Wed, 3 Apr 2024 00:22:24 +0200 (CEST) Date: Wed, 3 Apr 2024 00:22:23 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <766629d0-844c-498a-8558-eaac394787de@gmail.com> Message-ID: <682f6b31-4103-65f5-fcf7-21923597974b@passwd.hu> References: <20240401205607.9093-1-michael@niedermayer.cc> <77140ca3-bf2f-42db-9a76-264529c9ee5a@gmail.com> <20240401234007.GM6420@pb2> <766629d0-844c-498a-8558-eaac394787de@gmail.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 1/6] avformat/isom: Uninit layout in ff_mp4_read_dec_config_descr() 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 Mon, 1 Apr 2024, James Almer wrote: > On 4/1/2024 8:40 PM, Michael Niedermayer wrote: >> On Mon, Apr 01, 2024 at 06:33:22PM -0300, James Almer wrote: >>> On 4/1/2024 5:56 PM, Michael Niedermayer wrote: >>>> Fixes: memleak >>>> Fixes: 67442/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5068813261406208 >>>> >>>> Found-by: continuous fuzzing process >>>> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg >>>> Signed-off-by: Michael Niedermayer >>>> --- >>>> libavformat/isom.c | 1 + >>>> 1 file changed, 1 insertion(+) >>>> >>>> diff --git a/libavformat/isom.c b/libavformat/isom.c >>>> index 9fbccd4437f..c5930bd4d87 100644 >>>> --- a/libavformat/isom.c >>>> +++ b/libavformat/isom.c >>>> @@ -359,6 +359,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext >>>> *fc, AVStream *st, AVIOContext >>>> st->codecpar->extradata_size, >>>> 1, fc); >>>> if (ret < 0) >>>> return ret; >>>> + av_channel_layout_uninit(&st->codecpar->ch_layout); >>>> st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; >>> >>> Not strictly related to this fix, but should we really drop the layout >>> here >>> by forcing unspec? We're also not even bothering to check if cfg.channels >>> matches st->codecpar->ch_layout.nb_channels. >> >> I was wondering the same. >> I was hoping someone would know the specs well enouh to just say straight >> "this and that isnt legal together error out if thats true" > > Maybe Marton knows, since he's been working on this code. I don't really know for sure. But it would make sense to me to only drop the layout if the channel count is different from what we already know. Regards, Marton _______________________________________________ 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".