diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-11-30 11:21:35 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-02 09:28:47 +0300 |
commit | f8e5e1c52333e6c330fbb4fe8ec2cb07240ca8c5 (patch) | |
tree | 127a8c66a180930654aa58f02d30ae4f054e871d /libavcodec | |
parent | 0b934f8f17c19be6b73cc5ecc9a23f7451bee5d0 (diff) |
avcodec/movtextenc: Check for too long subtitles
Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/movtextenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |