[FFmpeg-cvslog] avformat/electronicarts: Clear partial_packet on error

Michael Niedermayer git at videolan.org
Sat Feb 20 22:11:05 EET 2021


ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Thu Feb 11 22:40:21 2021 +0100| [19312b8372557c4be1588279f185ead9b7845fe8] | committer: Michael Niedermayer

avformat/electronicarts: Clear partial_packet on error

Fixes: Infinite loop
Fixes: 30165/clusterfuzz-testcase-minimized-ffmpeg_dem_EA_fuzzer-6224642371092480

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 59bb9dc2a670cbe5d659585392b6d79f7bb6d40f)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=19312b8372557c4be1588279f185ead9b7845fe8
---

 libavformat/electronicarts.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 2f0ea5460a..5ad7e821d1 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -728,6 +728,7 @@ get_video_packet:
                 ret = av_get_packet(pb, pkt, chunk_size);
             if (ret < 0) {
                 packet_read = 1;
+                partial_packet = 0;
                 break;
             }
             partial_packet = chunk_type == MVIh_TAG;



More information about the ffmpeg-cvslog mailing list