[FFmpeg-cvslog] avcodec/movtextdec: Improve size check
Andreas Rheinhardt
git at videolan.org
Sat Dec 11 18:05:16 EET 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Dec 8 15:04:25 2021 +0100| [b9f5a26a39efc0e49e2296306efde572630b1796] | committer: Andreas Rheinhardt
avcodec/movtextdec: Improve size check
Reviewed-by: Philip Langdale <philipl at overt.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9f5a26a39efc0e49e2296306efde572630b1796
---
libavcodec/movtextdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 8dd571d64c..5083308d58 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -537,8 +537,8 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
m->size_var = 8;
//size_var is equal to 8 or 16 depending on the size of box
- if (tsmb_size == 0) {
- av_log(avctx, AV_LOG_ERROR, "tsmb_size is 0\n");
+ if (tsmb_size < m->size_var) {
+ av_log(avctx, AV_LOG_ERROR, "tsmb_size invalid\n");
return AVERROR_INVALIDDATA;
}
More information about the ffmpeg-cvslog
mailing list