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 AD13F499A7 for ; Tue, 26 Mar 2024 00:12:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5C9B168D5E2; Tue, 26 Mar 2024 02:12:00 +0200 (EET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D570C68D463 for ; Tue, 26 Mar 2024 02:11:53 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 2ED2BC0002 for ; Tue, 26 Mar 2024 00:11:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1711411913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:in-reply-to:in-reply-to:references:references; bh=QulAQmZ5MyPiVhehXaj1aaVOJ/jBqI/RmYKdG3cUH80=; b=j4phhYUE+1aHZDEuO9kppbCNNqBr7izZ+kP0+OZrcCvcx7V5zFBvlPSUFQWcbCVkwoq9jA 83mzAIAHH2KQJe9bhndvLZ7qgSEj0wdcm3Z5jo8Jb0MpzSgSYFDEWklvrZKbncZugRxDEd jrS2uEJrs6NYMU/1eSPdbOIGYKZe/kYNLBicRZIdvQud6D5ZvXuJ8s/pAjKnKsRTBeDi9I I33Eob5sVTF9VkPgqLOeCRnUojCcIk82m6hRjq8OdWTwaxAbiBvtKwbfVhh4lHsXddb2yC aooVanxtTLnnPoXJ3ZAYyVMk4e46vO/C5qBBORTLZ4VSKdgXR/8572DGsIWX+w== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 26 Mar 2024 01:11:43 +0100 Message-Id: <20240326001151.12083-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240326001151.12083-1-michael@niedermayer.cc> References: <20240326001151.12083-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 02/10] avformat/jacosubdec: Use 64bit for abs 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 MIME-Version: 1.0 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: Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-5401294942371840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/jacosubdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c index 447397b6a77..dabb298a264 100644 --- a/libavformat/jacosubdec.c +++ b/libavformat/jacosubdec.c @@ -150,7 +150,7 @@ static int get_shift(unsigned timeres, const char *buf) } ret = (int64_t)h*3600 + (int64_t)m*60 + s; - if (FFABS(ret) > (INT64_MAX - FFABS(d)) / timeres) + if (FFABS(ret) > (INT64_MAX - FFABS((int64_t)d)) / timeres) return 0; ret = sign * (ret * timeres + d); -- 2.17.1 _______________________________________________ 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".