projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8058284
)
oggparseogm: check timing variables
author
Anton Khirnov
<anton@khirnov.net>
Thu, 28 Nov 2013 09:54:35 +0000
(10:54 +0100)
committer
Anton Khirnov
<anton@khirnov.net>
Mon, 6 Jan 2014 07:21:38 +0000
(08:21 +0100)
Fixes a potential divide by zero.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
libavformat/oggparseogm.c
patch
|
blob
|
blame
|
history
diff --git
a/libavformat/oggparseogm.c
b/libavformat/oggparseogm.c
index
56ea557
..
2313625
100644
(file)
--- 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 */