This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 400912007a36465d6eed2f6b7e867a1fe0ad9016 Author: Michael Niedermayer <[email protected]> AuthorDate: Mon Sep 14 03:38:39 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Wed Sep 16 22:21:13 2026 +0000 avcodec/cfhd: reject header tags after the frame buffer was allocated Found during triage of the security report Fixes: NULL pointer dereference Fixes: 5cNIJSj1u1Lc/input-format-after-header.bin / gen-format-after-header.py Fixes: 5cNIJSj1u1Lc --- libavcodec/cfhd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index 13a62bdb55..7c8af2647c 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -632,6 +632,12 @@ static int cfhd_decode(AVCodecContext *avctx, AVFrame *pic, goto end; } + if (got_buffer && (s->coded_width || s->coded_height || s->coded_format != AV_PIX_FMT_NONE)) { + av_log(avctx, AV_LOG_ERROR, "Header tag after end of header\n"); + ret = AVERROR(EINVAL); + goto end; + } + if (tag == BitstreamMarker && data == CoefficientSegment && s->coded_format != AV_PIX_FMT_NONE) { int lowpass_height = s->plane[s->channel_num].band[0][0].height; @@ -919,8 +925,7 @@ finish: ff_thread_finish_setup(avctx); if (!s->a_width || !s->a_height || s->a_format == AV_PIX_FMT_NONE || - s->a_transform_type == INT_MIN || - s->coded_width || s->coded_height || s->coded_format != AV_PIX_FMT_NONE) { + s->a_transform_type == INT_MIN) { av_log(avctx, AV_LOG_ERROR, "Invalid dimensions\n"); ret = AVERROR(EINVAL); goto end; -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
