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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 96d8e19720 avcodec/mjpegdec: fix segfault on extern_huff and no 
extradata
96d8e19720 is described below

commit 96d8e1972025834c49ee153f976f8e6b1836d5ab
Author:     Ramiro Polla <[email protected]>
AuthorDate: Mon Jan 19 18:04:12 2026 +0100
Commit:     Ramiro Polla <[email protected]>
CommitDate: Wed Jan 21 03:26:02 2026 +0000

    avcodec/mjpegdec: fix segfault on extern_huff and no extradata
    
    Regression since 1debadd58e.
---
 libavcodec/mjpegdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 3af4b05551..c110130393 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -145,7 +145,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
     if ((ret = init_default_huffman_tables(s)) < 0)
         return ret;
 
-    if (s->extern_huff) {
+    if (s->extern_huff && avctx->extradata) {
         av_log(avctx, AV_LOG_INFO, "using external huffman table\n");
         bytestream2_init(&s->gB, avctx->extradata, avctx->extradata_size);
         if (ff_mjpeg_decode_dht(s)) {

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

Reply via email to