提交 2db7a3bc 编写于 作者: M Michael Niedermayer

avcodec/ffwavesynth: Check ts_end - ts_start for overflow

Fixes: signed integer overflow: 2314885530818453536 - -8926099139098304480 cannot be represented in type 'long'
Fixes: 15259/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5764366093254656

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 507ca66e
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册