[FFmpeg-devel] Fix leaked dictionary in mp3dec
Thomas Guilbert
tguilbert at chromium.org
Fri Apr 7 00:07:53 EEST 2017
The patch didn't show up as properly formatted on
https://patchwork.ffmpeg.org/patch/3228/.
Re-submitting using no line wrap in the base64 attachment, and copying the
contents of the patch for ease of review:
>From fced5ab0e09f529397adddcb560d1a08f2df4840 Mon Sep 17 00:00:00 2001
From: Thomas Guilbert <tguilbert at chromium.org>
Date: Thu, 30 Mar 2017 18:23:29 -0700
Subject: [PATCH] Fix dictionnary leak in mp3dec
---
libavformat/mp3dec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 0924a57843..fd8184cc0b 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -349,6 +349,7 @@ static int mp3_read_header(AVFormatContext *s)
int ret;
int i;
+ av_dict_free(&s->metadata);
s->metadata = s->internal->id3v2_meta;
s->internal->id3v2_meta = NULL;
--
2.12.2.564.g063fe858b8-goog
On Fri, Mar 31, 2017 at 12:39 PM, Thomas Guilbert <tguilbert at chromium.org>
wrote:
> Commit '65862f57ad2f7f49d715f334a9d892e0b20d42f1' overwrites s->metada
> with s->internal->id3v2_meta, which leaks an AVDictionary* if
> s->metada was not null.
>
> Please excuse any formatting problems in this email, this is my first
> time uploading a patch :)
>
> Thank you,
> Thomas
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mp3dec.patch
Type: text/x-patch
Size: 885 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170406/fcf6f169/attachment.bin>
More information about the ffmpeg-devel
mailing list