libavformat/cdxl: fix duration in case of overflow
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 29 Dec 2014 19:53:56 +0000 (20:53 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 29 Dec 2014 19:53:56 +0000 (20:53 +0100)
Fixes integer overflow
Fixes CID1260706

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/cdxl.c

index 2f1c87c..5bdf44b 100644 (file)
@@ -185,7 +185,7 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt)
                 if(cdxl->framerate)
                     st->duration = frames;
                 else
-                    st->duration = frames * audio_size;
+                    st->duration = frames * (int64_t)audio_size;
             }
             st->start_time           = 0;
             cdxl->video_stream_index = st->index;