1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/movtextenc: Check for too long subtitles

Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-11-30 09:21:35 +01:00
parent 0b934f8f17
commit f8e5e1c523

View File

@ -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;