summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/ffwavesynth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/ffwavesynth.c b/libavcodec/ffwavesynth.c
index 9d055e4019..a66113972b 100644
--- a/libavcodec/ffwavesynth.c
+++ b/libavcodec/ffwavesynth.c
@@ -267,7 +267,10 @@ static int wavesynth_parse_extradata(AVCodecContext *avc)
in->type = AV_RL32(edata + 16);
in->channels = AV_RL32(edata + 20);
edata += 24;
- if (in->ts_start < cur_ts || in->ts_end <= in->ts_start)
+ if (in->ts_start < cur_ts ||
+ in->ts_end <= in->ts_start ||
+ (uint64_t)in->ts_end - in->ts_start > INT64_MAX
+ )
return AVERROR(EINVAL);
cur_ts = in->ts_start;
dt = in->ts_end - in->ts_start;