Message ID | CAPUDrwdUMBmM9WFYvJohoQ7WUyWzKmV6DE8HR_F0_2KdLmEhtA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Tue, Nov 28, 2017 at 01:47:11PM -0800, Dale Curtis wrote: > Otherwise ff_alloc_extradata() just leaks any existing allocated > memory. Similar to the patch for ogm extradata leaks. > > Signed-off-by: Dale Curtis <dalecurtis@chromium.org> > oggparseopus.c | 1 + > 1 file changed, 1 insertion(+) > bf0b03b22a4eeee253d86fb8617fc8e00d945042 ogg_extradata_v1.patch > From ac7f2deaa48ac0578be19b178b7c0bc8040bc278 Mon Sep 17 00:00:00 2001 > From: Dale Curtis <dalecurtis@chromium.org> > Date: Tue, 28 Nov 2017 13:44:49 -0800 > Subject: [PATCH] [ogg] Free opus extradata before reallocating. > > Otherwise ff_alloc_extradata() just leaks any existing allocated > memory. will apply thanks [...]
From ac7f2deaa48ac0578be19b178b7c0bc8040bc278 Mon Sep 17 00:00:00 2001 From: Dale Curtis <dalecurtis@chromium.org> Date: Tue, 28 Nov 2017 13:44:49 -0800 Subject: [PATCH] [ogg] Free opus extradata before reallocating. Otherwise ff_alloc_extradata() just leaks any existing allocated memory. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> --- libavformat/oggparseopus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/oggparseopus.c b/libavformat/oggparseopus.c index f45ad84874..cd34cf23ba 100644 --- a/libavformat/oggparseopus.c +++ b/libavformat/oggparseopus.c @@ -62,6 +62,7 @@ static int opus_header(AVFormatContext *avf, int idx) /*gain = AV_RL16(packet + 16);*/ /*channel_map = AV_RL8 (packet + 18);*/ + av_freep(&st->codecpar->extradata); if (ff_alloc_extradata(st->codecpar, os->psize)) return AVERROR(ENOMEM); -- 2.15.0.417.g466bffb3ac-goog
Otherwise ff_alloc_extradata() just leaks any existing allocated memory. Similar to the patch for ogm extradata leaks. Signed-off-by: Dale Curtis <dalecurtis@chromium.org>