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 9D86D4B380 for ; Fri, 5 Jul 2024 00:22:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 06C2268D9AB; Fri, 5 Jul 2024 03:22:10 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B440568D9AB for ; Fri, 5 Jul 2024 03:21:58 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id EEFB660003 for ; Fri, 5 Jul 2024 00:21:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720138918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6LFf/YW9VLpk/ezXGnNq/Qbxda721ynxRMb5A0H4mLg=; b=XFLtcZmmSSj4vbTIvwmlPsxmpd633buYL6pzol2cXy3GGpDZq+o9z82Wlt1uxXOt6PRcU9 b0xKOVzSljMp2AxlsDlDI3Tc+7FrAwBUYTw8kL07IZWCr2TRFY1+qjnLs4F6dNJLBQQ7eb 6zHtH9GOfhVI5hYcsB66Drpw2wC5UfXha9FA29zLMWSHlI9nUPV74t+wx4IgkIXaCYkVEB ZDGqeFFGgxzZEb/588ja3aAcBMarrYs/JOcDpFuxykNntY3x5zXAwBk/XfQI9Kk1MXf0yF 3s67FNZk3pI0VO5utWDgnjSmzowJCetV9uv9z0b31PLNT5XdQdDRBlNQRk253Q== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 5 Jul 2024 02:21:43 +0200 Message-ID: <20240705002156.1964272-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240705002156.1964272-1-michael@niedermayer.cc> References: <20240705002156.1964272-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 02/15] avcodec/cri: Check length 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-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: CID1604394 Overflowed constant Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/cri.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/cri.c b/libavcodec/cri.c index 7b9a350967a..6932bb67456 100644 --- a/libavcodec/cri.c +++ b/libavcodec/cri.c @@ -234,10 +234,14 @@ static int cri_decode_frame(AVCodecContext *avctx, AVFrame *p, s->data_size = length; goto skip; case 105: + if (length <= 0) + return AVERROR_INVALIDDATA; hflip = bytestream2_get_byte(gb) != 0; length--; goto skip; case 106: + if (length <= 0) + return AVERROR_INVALIDDATA; vflip = bytestream2_get_byte(gb) != 0; length--; goto skip; -- 2.45.2 _______________________________________________ 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".