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 41F25454B6 for ; Sat, 1 Apr 2023 15:20:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5913D68BFC1; Sat, 1 Apr 2023 18:20:57 +0300 (EEST) Received: from 7.mo561.mail-out.ovh.net (7.mo561.mail-out.ovh.net [46.105.57.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DA3D468BDCB for ; Sat, 1 Apr 2023 18:20:51 +0300 (EEST) Received: from director4.ghost.mail-out.ovh.net (unknown [10.109.146.143]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id 3D1B9256E3 for ; Sat, 1 Apr 2023 15:20:51 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-sz8f9 (unknown [10.110.208.237]) by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id C8FA71FE47 for ; Sat, 1 Apr 2023 15:20:50 +0000 (UTC) Received: from mediaarea.net ([37.59.142.96]) by ghost-submission-6684bf9d7b-sz8f9 with ESMTPSA id eIQzLdJLKGQljg0AOmQZYg (envelope-from ) for ; Sat, 01 Apr 2023 15:20:50 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-96R0019db81356-1754-4ef4-a67b-ef2eafa7f5c1, 1B5A12A995DF2A8BF729FC989BD09F9755BD7E20) smtp.auth=zen-lists@mediaarea.net X-OVh-ClientIp: 84.143.156.215 Message-ID: <85c1e58e-cc90-5814-cba5-d91201dec993@mediaarea.net> Date: Sat, 1 Apr 2023 17:20:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <068476d4-1430-27bb-83c4-3a160d022596@mediaarea.net> <09775b73ab48e425f3b557aaa8d5847643ebe9b7.camel@haerdin.se> <0b6c3856-082c-cb33-e07c-3adf0502b93c@mediaarea.net> <20230401143739.GD1164690@pb2> From: Jerome Martinez In-Reply-To: <20230401143739.GD1164690@pb2> X-Ovh-Tracer-Id: 5463710777074026745 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeifedgkeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeflvghrohhmvgcuofgrrhhtihhnvgiiuceojhgvrhhomhgvsehmvgguihgrrghrvggrrdhnvghtqeenucggtffrrghtthgvrhhnpeekfeffvefhffekgeduleelfeeiheetgfeiffehheffffejgeeijedtiefguedvveenucfkphepuddvjedrtddrtddruddpkeegrddugeefrdduheeirddvudehpdefjedrheelrddugedvrdelieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehjvghrohhmvgesmhgvughirggrrhgvrgdrnhgvtheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrghdpoffvtefjohhsthepmhhoheeiuddpmhhouggvpehsmhhtphhouhht Subject: Re: [FFmpeg-devel] avformat/mxfenc: SMPTE RDD 48:2018 Amd 1:2022 (FFV1 in MXF) support 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 01/04/2023 16:37, Michael Niedermayer wrote: > On Tue, Mar 14, 2023 at 10:52:15AM +0100, Jerome Martinez wrote: > [...] >> + >> + memset(state, 128, sizeof(state)); >> + if (st->codecpar->extradata) { >> + ff_init_range_decoder(&c, st->codecpar->extradata, st->codecpar->extradata_size); >> + ff_build_rac_states(&c, 0.05 * (1LL << 32), 256 - 8); >> + v = get_ffv1_unsigned_symbol(&c, state); >> + av_assert0(v >= 2); >> + if (v > 4) { >> + return 0; >> + } >> + sc->micro_version = get_ffv1_unsigned_symbol(&c, state); >> + } else { >> + uint8_t keystate = 128; >> + ff_init_range_decoder(&c, pkt->data, pkt->size); >> + ff_build_rac_states(&c, 0.05 * (1LL << 32), 256 - 8); >> + get_rac(&c, &keystate); // keyframe >> + v = get_ffv1_unsigned_symbol(&c, state); >> + av_assert0(v < 2); > Are these asserts testing muxer input ? > if so what ensures that the values are within the asserted range ? My understanding of the code and workflow is that the input is currently rejected (AV_LOG_ERROR, "invalid version %d in ver01 header\n" and AV_LOG_ERROR, "Invalid version in global header\n") in ffv1dec.c during the analysis of this input so before this piece of code is reached. Could be an AV_LOG_ERROR if preferred. _______________________________________________ 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".