You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/bintext: protect against potential overflow of chars_per_frame
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -65,7 +65,7 @@ static AVStream * init_stream(AVFormatContext *s)
|
||||
avpriv_set_pts_info(st, 60, bin->framerate.den, bin->framerate.num);
|
||||
|
||||
/* simulate tty display speed */
|
||||
bin->chars_per_frame = FFMAX(av_q2d(st->time_base) * bin->chars_per_frame, 1);
|
||||
bin->chars_per_frame = av_clip(av_q2d(st->time_base) * bin->chars_per_frame, 1, INT_MAX);
|
||||
|
||||
return st;
|
||||
}
|
||||
|
Reference in New Issue
Block a user