[FFmpeg-cvslog] avformat/act: Check ff_get_wav_header() for failure

Michael Niedermayer git at videolan.org
Mon Oct 10 16:55:49 EEST 2022


ffmpeg | branch: release/4.1 | Michael Niedermayer <michael at niedermayer.cc> | Sun May 15 22:55:12 2022 +0200| [62dab58b9486d5e036c53dcce3bd78db57ac439b] | committer: Michael Niedermayer

avformat/act: Check ff_get_wav_header() for failure

Fixes: missing error check
Fixes: CID717495

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 5982da87e3464e7df529a169352748560d70ba80)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/act.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/act.c b/libavformat/act.c
index fe67411787..7cbffbfd05 100644
--- a/libavformat/act.c
+++ b/libavformat/act.c
@@ -66,6 +66,7 @@ static int read_header(AVFormatContext *s)
     AVIOContext *pb = s->pb;
     int size;
     AVStream* st;
+    int ret;
 
     int min,sec,msec;
 
@@ -75,7 +76,9 @@ static int read_header(AVFormatContext *s)
 
     avio_skip(pb, 16);
     size=avio_rl32(pb);
-    ff_get_wav_header(s, pb, st->codecpar, size, 0);
+    ret = ff_get_wav_header(s, pb, st->codecpar, size, 0);
+    if (ret < 0)
+        return ret;
 
     /*
       8000Hz (Fine-rec) file format has 10 bytes long



More information about the ffmpeg-cvslog mailing list