diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-21 23:19:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-21 23:37:49 +0200 |
commit | 7e3e653618a59960b4c358e333ba2c0d21929e33 (patch) | |
tree | ca4bd8114d80f6cec77498ea753002647c689102 /libavformat | |
parent | c9660999b9a76541cc0ccee1e572f4ee1540d8c5 (diff) | |
download | ffmpeg-streaming-7e3e653618a59960b4c358e333ba2c0d21929e33.zip ffmpeg-streaming-7e3e653618a59960b4c358e333ba2c0d21929e33.tar.gz |
avformat/bintext: protect against potential overflow of chars_per_frame
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/bintext.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/bintext.c b/libavformat/bintext.c index d504607..d50a8d9 100644 --- a/libavformat/bintext.c +++ b/libavformat/bintext.c @@ -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; } |