aboutsummaryrefslogtreecommitdiff
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer2018-03-08 22:40:50 +0100
committerMichael Niedermayer2018-03-10 02:44:45 +0100
commit06e092e7819b9437da32925200e7c369f93d82e7 (patch)
tree6e509c53fe446b304493ed16a33a9b3dd625f3a4 /libavformat/avidec.c
parent02ecda4aba69670ca744ccc640391b7621f01fb0 (diff)
avformat/avidec: Fix integer overflow in cum_len check
Fixes: signed integer overflow: 3775922176 * 4278190080 cannot be represented in type 'long' Fixes: Chromium bug 791237 Reported-by: Matt Wolenetz <wolenetz@google.com> Reviewed-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 3ff515d492..bafe1dc8da 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -670,7 +670,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
st->start_time = 0;
avio_rl32(pb); /* buffer size */
avio_rl32(pb); /* quality */
- if (ast->cum_len*ast->scale/ast->rate > 3600) {
+ if (ast->cum_len > 3600LL * ast->rate / ast->scale) {
av_log(s, AV_LOG_ERROR, "crazy start time, iam scared, giving up\n");
ast->cum_len = 0;
}