[FFmpeg-cvslog] oggparseogm: check timing variables
Anton Khirnov
git at videolan.org
Mon Mar 10 18:36:39 CET 2014
ffmpeg | branch: release/0.10 | Anton Khirnov <anton at khirnov.net> | Thu Nov 28 10:54:35 2013 +0100| [b0db7a523df5ce5c5bcfb21d64a8f2a5fdcd5b42] | committer: Reinhard Tartler
oggparseogm: check timing variables
Fixes a potential divide by zero.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable at libav.org
(cherry picked from commit 75647dea6f7db79b409bad66a119f5c73da730f3)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
(cherry picked from commit bf7c240a50f8ed99a42e08bb7a8a70262cce34ad)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0db7a523df5ce5c5bcfb21d64a8f2a5fdcd5b42
---
libavformat/oggparseogm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c
index c761bbd..b74537c 100644
--- a/libavformat/oggparseogm.c
+++ b/libavformat/oggparseogm.c
@@ -75,6 +75,11 @@ ogm_header(AVFormatContext *s, int idx)
time_unit = bytestream2_get_le64(&p);
spu = bytestream2_get_le64(&p);
+ if (!time_unit || !spu) {
+ av_log(s, AV_LOG_ERROR, "Invalid timing values.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
bytestream2_skip(&p, 4); /* default_len */
bytestream2_skip(&p, 8); /* buffersize + bits_per_sample */
More information about the ffmpeg-cvslog
mailing list