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 AE85B4B378 for ; Fri, 5 Jul 2024 00:22:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0CB1468DAF9; Fri, 5 Jul 2024 03:22:19 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B96F868DAD0 for ; Fri, 5 Jul 2024 03:22:06 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B0DB61BF203 for ; Fri, 5 Jul 2024 00:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720138925; 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=ECFDe30C8eVCWEPcS4mSGgnFGCuE4UUyT3wS6DRRcYs=; b=n0EK0qRh8TeRj3uiWNHoaqyFpFq1QOwK6W6W7qVjxU1dW8BveSFHA5oNFMrb4DhcDKRAPc axTQG3DJ7gubQ2+trDl1bb3F/a/5eV3Riy/cYeDkR22MdgYAgcyHubmMy1FEqthiTqrP7X 4y0juc6f0j3SuP//SLfXlNEwEupFR6v1pfbxxw2IfUxp8xaaV2qN1IrKs+00maPb+omLjg W5k9ne2lq+8JOB0hcZYwo0HKV5vdcB5B+V62AKRtg/UFeckNtABHgrK3wvndioarGy9vMV 0Nt56YRMzyUMInRQUKHqvanx+0JZ6rXopPV+YXwAg56Y/kttJc9GZ5vV/Gu8+A== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 5 Jul 2024 02:21:52 +0200 Message-ID: <20240705002156.1964272-11-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 11/15] avcodec/loco: Check loco_get_rice() for failure 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: CID1604495 Overflowed constant Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/loco.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/loco.c b/libavcodec/loco.c index 4aba1eb9c52..d73d8fa88bb 100644 --- a/libavcodec/loco.c +++ b/libavcodec/loco.c @@ -157,6 +157,8 @@ static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int heigh /* restore top left pixel */ val = loco_get_rice(&rc); + if (val == INT_MIN) + return AVERROR_INVALIDDATA; data[0] = 128 + val; /* restore top line */ for (i = 1; i < width; i++) { -- 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".