mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/wtvdec: Check for EOF before seeking back in parse_media_type()
Fixes: Infinite loop Fixes: 36311/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-4889181296918528 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2bbef69b0b
commit
89505d38de
@ -652,6 +652,8 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
|
||||
avio_skip(pb, size - 32);
|
||||
ff_get_guid(pb, &actual_subtype);
|
||||
ff_get_guid(pb, &actual_formattype);
|
||||
if (avio_feof(pb))
|
||||
return NULL;
|
||||
avio_seek(pb, -size, SEEK_CUR);
|
||||
|
||||
st = parse_media_type(s, st, sid, mediatype, actual_subtype, actual_formattype, size - 32);
|
||||
|
Loading…
Reference in New Issue
Block a user