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 DDE6E47566 for ; Mon, 13 May 2024 01:20:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A514068D449; Mon, 13 May 2024 04:20:20 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 54C4668CF4C for ; Mon, 13 May 2024 04:20:14 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 5E6DE20002 for ; Mon, 13 May 2024 01:20:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1715563213; 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; bh=j1XFU8e5ApQO6kidz1W2DZsnR8WhMukh11uNFULwK/U=; b=e+cTBiZRexThFK0dmzK0x1Mvo4kmDofAM0f9/YRav9I8z0myr8NtD4zktMwi4mPMWVp5Kj Cb85vcMGHnrk3O/GCXLdzygQl36q6AyA6+gd9OAWumDHVLCvmXFGlkeJeRFnPs/Pnw097a saMAPYG94SVBdnP+dxJmFZRqNVCITbtLVZrNm0Y47d+dsJezFhkZNvpJLKJVS64eP06jz/ ZHIXzRnNk5K6DZwdiB4sGKRpmSaIlzaGcCXiz2vwyLFv3A661X4WOrtE8vcm4IjyTf8ZJy DN0JJqEs1+gMqnL9Tzl25n76ZDRmHHTK2MHwlV6XnDhJb2c9NeoGPT/Hx1DapA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 13 May 2024 03:20:08 +0200 Message-ID: <20240513012011.1049366-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 1/4] avcodec/notchlc: Check init_get_bits8() 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: CID1500300 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/notchlc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/notchlc.c b/libavcodec/notchlc.c index 6dd3f884407..30427f4ba92 100644 --- a/libavcodec/notchlc.c +++ b/libavcodec/notchlc.c @@ -243,7 +243,9 @@ static int decode_blocks(AVCodecContext *avctx, AVFrame *p, bytestream2_seek(&dgb, s->y_data_offset + row_offset, SEEK_SET); - init_get_bits8(&bit, dgb.buffer, bytestream2_get_bytes_left(&dgb)); + ret = init_get_bits8(&bit, dgb.buffer, bytestream2_get_bytes_left(&dgb)); + if (ret < 0) + return ret; for (int x = 0; x < avctx->width; x += 4) { unsigned item = bytestream2_get_le32(gb); unsigned y_min = item & 4095; -- 2.43.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".