[FFmpeg-cvslog] avcodec/wmaprodec: Check that the EOF frame was allocated before decoding into it

Michael Niedermayer git at videolan.org
Fri Sep 17 21:09:16 EEST 2021


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Sep 17 00:21:25 2021 +0200| [48bbeac259a9eb323018c3715a84008867e1294f] | committer: Michael Niedermayer

avcodec/wmaprodec: Check that the EOF frame was allocated before decoding into it

Fixes: NULL pointer dereference
Fixes: 38125/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5151909422432256

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>

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

 libavcodec/wmaprodec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index a4b48b13a8..7b489943f4 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -1855,7 +1855,7 @@ static int xma_decode_packet(AVCodecContext *avctx, void *data,
         eof = 1;
 
         for (i = 0; i < s->num_streams; i++) {
-            if (!s->xma[i].eof_done) {
+            if (!s->xma[i].eof_done && s->frames[i]->data[0]) {
                 ret = decode_packet(avctx, &s->xma[i], s->frames[i],
                                     &got_stream_frame_ptr, avpkt);
             }



More information about the ffmpeg-cvslog mailing list