[FFmpeg-devel] fix minor leak in id3v2 parsing

James Almer jamrial at gmail.com
Wed Oct 25 01:38:58 EEST 2017


On 10/24/2017 7:33 PM, Fredrik Hubinette wrote:
> From a6a79bda55868f7faee0f183a45191d3251fb5f1 Mon Sep 17 00:00:00 2001
> From: Fredrik Hubinette <hubbe at google.com>
> Date: Tue, 7 Feb 2017 12:19:38 -0800
> Subject: [PATCH] Fix minor ffmpeg memory leak in id3v2 parsing.
> 
> Reviewed-on: https://chromium-review.googlesource.com/439405
> Reviewed-by: Dale Curtis <dalecurtis at chromium.org>
> ---
>  libavformat/id3v2.c     | 4 ++--
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
> index 9969d7a6ca..b3036d2f87 100644
> --- a/libavformat/id3v2.c
> +++ b/libavformat/id3v2.c
> @@ -688,9 +688,9 @@ static void read_chapter(AVFormatContext *s,
> AVIOContext *pb, int len, const cha
>      }
> 
>      if (decode_str(s, pb, 0, &dst, &len) < 0)
> -        return;
> +      goto end;
>      if (len < 16)
> -        return;
> +      goto end;
> 
>      start = avio_rb32(pb);
>      end   = avio_rb32(pb);
> 

This doesn't seem to apply to git head, or even the recently cut 3.4
branch. Was this patch made for the 3.3 branch?


More information about the ffmpeg-devel mailing list