This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 1ffcd0740060eb20bc8850d3ba9e38e95f9c6b3c
Author:     James Almer <[email protected]>
AuthorDate: Thu Jan 15 16:37:20 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Sat Jan 17 12:02:31 2026 -0300

    avcodec/mimic: check return value of init_get_bits()
    
    Fixes part of issue #21476.
    
    Signed-off-by: James Almer <[email protected]>
---
 libavcodec/mimic.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 2925aa50f7..08e250961e 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -399,7 +399,9 @@ static int mimic_decode_frame(AVCodecContext *avctx, 
AVFrame *rframe,
     ctx->bbdsp.bswap_buf(ctx->swap_buf,
                          (const uint32_t *) (buf + MIMIC_HEADER_SIZE),
                          swap_buf_size >> 2);
-    init_get_bits(&ctx->gb, ctx->swap_buf, swap_buf_size << 3);
+    res = init_get_bits8(&ctx->gb, ctx->swap_buf, swap_buf_size);
+    if (res < 0)
+        return res;
 
     res = decode(ctx, quality, num_coeffs, !is_pframe);
     ff_progress_frame_report(&ctx->frames[ctx->cur_index], INT_MAX);

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to