[FFmpeg-cvslog] avformat/mxfdec: cleanup if parsing the header metadata fails

Michael Niedermayer git at videolan.org
Wed Oct 15 06:09:21 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct 15 02:20:58 2014 +0200| [676110e6d4c455acac4f234d79ab57996d43a8e7] | committer: Michael Niedermayer

avformat/mxfdec: cleanup if parsing the header metadata fails

Fixes memleaks
Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 05ac0a1..94fe7d4 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2294,7 +2294,8 @@ static int mxf_read_header(AVFormatContext *s)
                 }
                 if (res < 0) {
                     av_log(s, AV_LOG_ERROR, "error reading header metadata\n");
-                    return res;
+                    ret = res;
+                    goto fail;
                 }
                 break;
             } else {



More information about the ffmpeg-cvslog mailing list