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 71F6249D2C for ; Mon, 8 Apr 2024 18:21:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A121B68D2DF; Mon, 8 Apr 2024 21:21:08 +0300 (EEST) Received: from wrqvqsbb.outbound-mail.sendgrid.net (wrqvqsbb.outbound-mail.sendgrid.net [149.72.70.187]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E25CF68D1D1 for ; Mon, 8 Apr 2024 21:21:01 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=frankplowman.com; h=from:subject:mime-version:to:cc:content-transfer-encoding: content-type:cc:content-type:from:subject:to; s=s1; bh=GbR6ljCxNTu2wrgyyGLX1ylz201YIHzZBov7nCtbdT8=; b=TwGsLGtSHv4lfGFrFqCXMkibbARg6ry00NuOBJ2Mn+ujycTXCEasSScrNOf+YOnWt7wr rwR+1RDbpO4yqZxyil+U2YQqi6nvEs9gzortoga2H8ZPDYofn9uSLFviQ1J0Yge+q8aXDc iiZsiyxM/ntUBpzhp3RyCuj0I5Q7eW0+Yqkf2Bxj3B9U0A+AlUzUsaYB7BQjkMUNgcauyT aMBzLfzPDy2h78zOM5SHca1+spAy3LFFneGtxFCvAz2R3O2Fre1TzVmROlqfJNgQDPs0VL eOuPvo85xeShXk626Jmy6blJDBL2ukPGRB/CLFzBRIjxFnENMgFAN31rODZsbzQw== Received: by recvd-7d655c67dd-gr9c8 with SMTP id recvd-7d655c67dd-gr9c8-1-6614358B-4 2024-04-08 18:20:59.143315979 +0000 UTC m=+1804792.469242333 Received: from localhost.localdomain (unknown) by geopod-ismtpd-9 (SG) with ESMTP id OrpLjK_1TwuIACyci7aCEQ Mon, 08 Apr 2024 18:20:58.822 +0000 (UTC) From: Frank Plowman Date: Mon, 08 Apr 2024 18:20:59 +0000 (UTC) Message-ID: <20240408182051.514137-1-post@frankplowman.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?u001=2EZ0KJCHpts8tvDq7PHgz5cpqJ+vJcSmdTtST=2Fg91WT3qAbNxUpEMGIDQq9?= =?us-ascii?Q?1mXy3Yjvepp8fYsFUJzGsyhT1EwBcl8YxZnspu0?= =?us-ascii?Q?c4tIBnLtxHZ1dnecGNg9fbrmOyLuhHz8VkXh27E?= =?us-ascii?Q?a6M=2FuR7CsSDq4DVNeL2ydp+EpUkZoyYPZO5eo=2F6?= =?us-ascii?Q?7R70XPlcZQXfBV=2FfHshEYFqUUyzFcfO+cHcD0av?= =?us-ascii?Q?AfakPj6aSCfQn+e00nCt5OEOu1JWyN77frAKC0x?= =?us-ascii?Q?IyEh?= To: ffmpeg-devel@ffmpeg.org X-Entity-ID: u001.qzljkbu34TNIX4NwfTiKWA== Subject: [FFmpeg-devel] [PATCH] lavc/vvc_parser: Fix integer overflow calculating framerate 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 Cc: Frank Plowman Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: num_units_in_tick and time_scale are both 32-bit unsigned integers. Storing them as ints was causing overflows. Signed-off-by: Frank Plowman --- libavcodec/vvc_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vvc_parser.c b/libavcodec/vvc_parser.c index a6a5be27ae..e3501fa139 100644 --- a/libavcodec/vvc_parser.c +++ b/libavcodec/vvc_parser.c @@ -191,8 +191,8 @@ static void set_parser_ctx(AVCodecParserContext *s, AVCodecContext *avctx, if (sps->sps_ptl_dpb_hrd_params_present_flag && sps->sps_timing_hrd_params_present_flag) { - int num = sps->sps_general_timing_hrd_parameters.num_units_in_tick; - int den = sps->sps_general_timing_hrd_parameters.time_scale; + uint32_t num = sps->sps_general_timing_hrd_parameters.num_units_in_tick; + uint32_t den = sps->sps_general_timing_hrd_parameters.time_scale; if (num != 0 && den != 0) av_reduce(&avctx->framerate.den, &avctx->framerate.num, -- 2.44.0 _______________________________________________ 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".