This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 85c6634959e02639deacb9010746234c11904b6c Author: Michael Niedermayer <[email protected]> AuthorDate: Tue Oct 20 15:10:36 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Tue Oct 20 20:41:50 2026 +0000 avcodec/srtdec: do not read the event beyond the packet Fixes: a3ewdvDE2QSe Fixes: out of array read Out of array read Replicated through API with ASAN Found during triage of the review of https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24659 Found-by: Marton Balint <[email protected]> Suggested-by: Marton Balint <[email protected]> --- libavcodec/srtdec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c index 8697f5b149..1115a0d9fb 100644 --- a/libavcodec/srtdec.c +++ b/libavcodec/srtdec.c @@ -28,6 +28,7 @@ #include "avcodec.h" #include "ass.h" #include "codec_internal.h" +#include "decode.h" #include "htmlsubtitles.h" static int srt_to_ass(AVCodecContext *avctx, AVBPrint *dst, @@ -75,9 +76,13 @@ static int srt_decode_frame(AVCodecContext *avctx, AVSubtitle *sub, if (avpkt->size <= 0) return avpkt->size; + const char *text = ff_decode_subtitle_text(avctx, avpkt); + if (!text) + return AVERROR(ENOMEM); + av_bprint_init(&buffer, 0, AV_BPRINT_SIZE_UNLIMITED); - ret = srt_to_ass(avctx, &buffer, avpkt->data, x1, y1, x2, y2); + ret = srt_to_ass(avctx, &buffer, text, x1, y1, x2, y2); if (ret >= 0) ret = ff_ass_add_rect(sub, buffer.str, s->readorder++, 0, NULL, NULL); av_bprint_finalize(&buffer, NULL); -- 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]
