[vlc-commits] packetizer: h264: check for overflow in rate

Francois Cartegnie git at videolan.org
Wed Jul 19 11:30:58 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul 19 10:53:18 2017 +0200| [55e75b1e94954dd9e15e59e25d0102e82b4ea4ee] | committer: Francois Cartegnie

packetizer: h264: check for overflow in rate

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55e75b1e94954dd9e15e59e25d0102e82b4ea4ee
---

 modules/packetizer/h264.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index 342e27729c..0ed0de91d4 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -354,7 +354,8 @@ static int Open( vlc_object_t *p_this )
     p_dec->fmt_out.b_packetized = true;
 
     if( p_dec->fmt_in.video.i_frame_rate_base &&
-        p_dec->fmt_in.video.i_frame_rate )
+        p_dec->fmt_in.video.i_frame_rate &&
+        p_dec->fmt_in.video.i_frame_rate <= UINT_MAX / 2 )
     {
         date_Change( &p_sys->dts, p_dec->fmt_in.video.i_frame_rate * 2,
                                   p_dec->fmt_in.video.i_frame_rate_base );



More information about the vlc-commits mailing list