diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-08 02:52:15 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-08 02:58:01 +0100 |
commit | 1a088f61e1b8d620c313c47d861a1a4b29fd7156 (patch) | |
tree | 045249d4b3120aa47fa9c0c1569f5b6ee181e9f4 | |
parent | 4c80184cf5425f11c45ff91f669a1be9cf6d32cd (diff) | |
download | ffmpeg-1a088f61e1b8d620c313c47d861a1a4b29fd7156.tar.gz |
oggparseskeleton: Check the overall start time before using it.
Fixes division by zero
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/oggparseskeleton.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c index f9ad701145..b6959a6543 100644 --- a/libavformat/oggparseskeleton.c +++ b/libavformat/oggparseskeleton.c @@ -61,7 +61,7 @@ static int skeleton_header(AVFormatContext *s, int idx) start_num = AV_RL64(buf+12); start_den = AV_RL64(buf+20); - if (start_den) { + if (start_den > 0 && start_num > 0) { int base_den; av_reduce(&start_time, &base_den, start_num, start_den, INT_MAX); avpriv_set_pts_info(st, 64, 1, base_den); |