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:
Diffstat (limited to 'libavformat/asfenc.c')
-rw-r--r--libavformat/asfenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 90d5c26317..87993b64c9 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -964,6 +964,11 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts;
av_assert0(pts != AV_NOPTS_VALUE);
+ if ( pts < - PREROLL_TIME
+ || pts > (INT_MAX-3)/10000LL * ASF_INDEXED_INTERVAL - PREROLL_TIME) {
+ av_log(s, AV_LOG_ERROR, "input pts %"PRId64" is invalid\n", pts);
+ return AVERROR(EINVAL);
+ }
pts *= 10000;
asf->duration = FFMAX(asf->duration, pts + pkt->duration * 10000);