mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/electronicarts: Check for EOF in each iteration of the loop in ea_read_packet()
Fixes: timeout(>20sec -> 1ms) Fixes: 26526/clusterfuzz-testcase-minimized-ffmpeg_dem_EA_fuzzer-5672328069120000 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
6e64d89410
commit
857aba7c45
|
@ -582,6 +582,8 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||
int av_uninit(num_samples);
|
||||
|
||||
while ((!packet_read && !hit_end) || partial_packet) {
|
||||
if (avio_feof(pb))
|
||||
return AVERROR_EOF;
|
||||
chunk_type = avio_rl32(pb);
|
||||
chunk_size = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
|
||||
if (chunk_size < 8)
|
||||
|
|
Loading…
Reference in New Issue