[FFmpeg-devel] [PATCH 2/4] lavf/matroskaenc: fix uninitialized read

James Almer jamrial at gmail.com
Thu Oct 27 16:29:32 EEST 2016


On 10/27/2016 3:16 AM, Rodger Combs wrote:
> ---
>  libavformat/matroskaenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index d91055f..c94a490 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -1547,7 +1547,7 @@ static int mkv_write_attachments(AVFormatContext *s)
>  
>      mkv->attachments = av_mallocz(sizeof(*mkv->attachments));
>      if (!mkv->attachments)
> -        return ret;
> +        return AVERROR(ENOMEM);
>  
>      av_lfg_init(&c, av_get_random_seed());

LGTM. Sorry about that.

Make sure to backport this to release/3.2 branch asap as well.



More information about the ffmpeg-devel mailing list