Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/4] avcodec/notchlc: Check init_get_bits8() for failure
@ 2024-05-13  1:20 Michael Niedermayer
  2024-05-13  1:20 ` [FFmpeg-devel] [PATCH 2/4] avcodec/pcm-dvdenc: 64bit pkt-size Michael Niedermayer
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Michael Niedermayer @ 2024-05-13  1:20 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Fixes: CID1500300 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 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".

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-02 19:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-13  1:20 [FFmpeg-devel] [PATCH 1/4] avcodec/notchlc: Check init_get_bits8() for failure Michael Niedermayer
2024-05-13  1:20 ` [FFmpeg-devel] [PATCH 2/4] avcodec/pcm-dvdenc: 64bit pkt-size Michael Niedermayer
2024-05-13  1:20 ` [FFmpeg-devel] [PATCH 3/4] avcodec/proresenc_anatoliy: Assert that AV_PROFILE_UNKNOWN is replaced Michael Niedermayer
2024-05-13  1:20 ` [FFmpeg-devel] [PATCH 4/4] avcodec/qsvdec: Check av_image_get_buffer_size() for failure Michael Niedermayer
2024-05-13  1:47   ` Xiang, Haihao
2024-05-19 19:50     ` Michael Niedermayer
2024-06-02 19:17 ` [FFmpeg-devel] [PATCH 1/4] avcodec/notchlc: Check init_get_bits8() " Michael Niedermayer

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git