[FFmpeg-cvslog] avformat/oggparsevorbis: fix leak of ct

Michael Niedermayer git at videolan.org
Mon Sep 23 22:40:07 CEST 2013


ffmpeg | branch: release/2.0 | Michael Niedermayer <michaelni at gmx.at> | Wed Aug  7 17:18:19 2013 +0200| [c7966bf7956497661ca98ffd5ed4fbc6321deb63] | committer: James Almer

avformat/oggparsevorbis: fix leak of ct

Fixes CID1061058
Fixes fate

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit d0a882ab1d2a4197da1edd77450af30e2da3460e)

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

 libavformat/oggparsevorbis.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index a21b3a9..3938f07 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -136,11 +136,13 @@ ff_vorbis_comment(AVFormatContext * as, AVDictionary **m, const uint8_t *buf, in
 
                 if (!pict) {
                     av_log(as, AV_LOG_WARNING, "out-of-memory error. Skipping cover art block.\n");
+                    av_freep(&ct);
                     continue;
                 }
                 if ((ret = av_base64_decode(pict, ct, vl)) > 0)
                     ret = ff_flac_parse_picture(as, pict, ret);
                 av_freep(&pict);
+                av_freep(&ct);
                 if (ret < 0) {
                     av_log(as, AV_LOG_WARNING, "Failed to parse cover art block.\n");
                     continue;



More information about the ffmpeg-cvslog mailing list