Message ID | 20201109230456.11188-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 9ef60a66f1f155605049402415bd901c8baf1a24 |
Headers | show |
Series | [FFmpeg-devel,1/7] avformat/sbgdec: Check that end is not before start | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
Michael Niedermayer (12020-11-10): > Fixes: signed integer overflow: -9223372036854775808 + -5279949906739200 cannot be represented in type 'long' > Fixes: 26908/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6329610851319808 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavformat/sbgdec.c | 5 +++++ > 1 file changed, 5 insertions(+) Should be ok. Regards,
On Tue, Nov 10, 2020 at 12:34:23PM +0100, Nicolas George wrote: > Michael Niedermayer (12020-11-10): > > Fixes: signed integer overflow: -9223372036854775808 + -5279949906739200 cannot be represented in type 'long' > > Fixes: 26908/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6329610851319808 > > > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > > --- > > libavformat/sbgdec.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > Should be ok. will apply thx [...]
diff --git a/libavformat/sbgdec.c b/libavformat/sbgdec.c index 4d6ae7abc5..f56eb9ff59 100644 --- a/libavformat/sbgdec.c +++ b/libavformat/sbgdec.c @@ -1416,6 +1416,11 @@ static av_cold int sbg_read_header(AVFormatContext *avf) if (r < 0) goto fail; + if (script.end_ts != AV_NOPTS_VALUE && script.end_ts < script.start_ts) { + r = AVERROR_INVALIDDATA; + goto fail; + } + st = avformat_new_stream(avf, NULL); if (!st) return AVERROR(ENOMEM);
Fixes: signed integer overflow: -9223372036854775808 + -5279949906739200 cannot be represented in type 'long' Fixes: 26908/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6329610851319808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/sbgdec.c | 5 +++++ 1 file changed, 5 insertions(+)