[FFmpeg-cvslog] avformat/matroskaenc: Check ff_put_wav_header() failure

Andreas Rheinhardt git at videolan.org
Sat May 25 15:09:27 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed May 22 10:49:10 2024 +0200| [50c25d1f0a55dcd7f979e1c27a4b8c26f42ea939] | committer: Andreas Rheinhardt

avformat/matroskaenc: Check ff_put_wav_header() failure

Fixes Coverity issue #1506706.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

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

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 63bae9fe1c..76c542d50b 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1250,7 +1250,9 @@ static int mkv_assemble_codecprivate(AVFormatContext *s, AVIOContext *dyn_cp,
             par->codec_tag = tag;
 
         /* Same comment as for ff_put_bmp_header applies here. */
-        ff_put_wav_header(s, dyn_cp, par, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);
+        ret = ff_put_wav_header(s, dyn_cp, par, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);
+        if (ret < 0)
+            return ret;
 #endif
     }
 



More information about the ffmpeg-cvslog mailing list