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:
parent
0b934f8f17
commit
f8e5e1c523
@ -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);
|
AV_WB16(buf, s->byte_count);
|
||||||
buf += 2;
|
buf += 2;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user