[FFmpeg-cvslog] ismindex: check return value of avio_open_dyn_buf()

Michael Niedermayer git at videolan.org
Mon Oct 29 03:27:39 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Oct 29 02:53:43 2012 +0100| [224afddc7c869472caa57fc571aaf979a85d24ef] | committer: Michael Niedermayer

ismindex: check return value of avio_open_dyn_buf()

Fixes CID733723
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/tools/ismindex.c b/tools/ismindex.c
index b801d43..9efdebe 100644
--- a/tools/ismindex.c
+++ b/tools/ismindex.c
@@ -251,7 +251,10 @@ static int get_video_private_data(struct VideoFile *vf, AVCodecContext *codec)
     if (codec->codec_id == AV_CODEC_ID_VC1)
         return get_private_data(vf, codec);
 
-    avio_open_dyn_buf(&io);
+    if (avio_open_dyn_buf(&io) < 0)  {
+        err = AVERROR(ENOMEM);
+        goto fail;
+    }
     if (codec->extradata_size < 11 || codec->extradata[0] != 1)
         goto fail;
     sps_size = AV_RB16(&codec->extradata[6]);



More information about the ffmpeg-cvslog mailing list