ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Tue Nov 30 09:21:35 2021 +0100| [f8e5e1c52333e6c330fbb4fe8ec2cb07240ca8c5] | committer: Andreas Rheinhardt
avcodec/movtextenc: Check for too long subtitles Reviewed-by: Philip Langdale <phil...@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f8e5e1c52333e6c330fbb4fe8ec2cb07240ca8c5 --- libavcodec/movtextenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/movtextenc.c b/libavcodec/movtextenc.c index 46109e0a5e..eecadaf503 100644 --- a/libavcodec/movtextenc.c +++ b/libavcodec/movtextenc.c @@ -667,6 +667,8 @@ static int mov_text_encode_frame(AVCodecContext *avctx, unsigned char *buf, } } + if (s->byte_count > UINT16_MAX) + return AVERROR(ERANGE); AV_WB16(buf, s->byte_count); buf += 2; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".