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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user