mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-04 01:36:07 +00:00
avformat/tty: Fix division by 0 in probe
Fixes: division by zero Fixes: 20436/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5763229752229888 Fixes: 20503/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4841641154445312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c9c958051c
commit
87d54a6239
@ -53,6 +53,9 @@ static int read_probe(const AVProbeData *p)
|
||||
{
|
||||
int cnt = 0;
|
||||
|
||||
if (!p->buf_size)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < p->buf_size; i++)
|
||||
cnt += !!isansicode(p->buf[i]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user