Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-12-04 15:46:53 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-04 15:47:58 +0300
commit0c1d62ab9d757d546fafca366d776524e7bb9893 (patch)
treea51e6e50d52b27401b0d0891034acb109ba7d342 /libavformat/oggparsetheora.c
parent2ff61c3c1a0a7d8de741ba37c7662dedb6ad4b60 (diff)
avformat/oggparsetheora: Check duration to be not AV_NOPTS_VALUE (and positive) before use
Fixes: 1536b9b096a8f95b742bae9d3d761cc6/signal_sigsegv_294aaed_7322_4fad88a38dc8952dc20dcb60c1895758.ogg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/oggparsetheora.c')
-rw-r--r--libavformat/oggparsetheora.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index e92d4c5170..6e6a362e1e 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -191,7 +191,7 @@ static int theora_packet(AVFormatContext *s, int idx)
os->lastpts = os->lastdts = theora_gptopts(s, idx, os->granule, NULL) - duration;
if(s->streams[idx]->start_time == AV_NOPTS_VALUE) {
s->streams[idx]->start_time = os->lastpts;
- if (s->streams[idx]->duration)
+ if (s->streams[idx]->duration > 0)
s->streams[idx]->duration -= s->streams[idx]->start_time;
}
}