diff mbox series

[FFmpeg-devel,68/72] avcodec/proresenc_anatoliy: Fix memleak upon init error

Message ID 20201127174652.2838198-23-andreas.rheinhardt@gmail.com
State Accepted
Commit d789d72d30d8cb6c0a9b5b1140589da1eae44e1e
Headers show
Series [FFmpeg-devel,01/45] avcodec/a64multienc: Fix memleak upon init failure
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Nov. 27, 2020, 5:46 p.m. UTC
A buffer may leak in case of YUVA444P10 with dimensions that are not
both divisible by 16.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/proresenc_anatoliy.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Andreas Rheinhardt April 2, 2021, 4:25 p.m. UTC | #1
On Fri, Nov 27, 2020 at 6:47 PM Andreas Rheinhardt <
andreas.rheinhardt@gmail.com> wrote:

> A buffer may leak in case of YUVA444P10 with dimensions that are not
> both divisible by 16.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavcodec/proresenc_anatoliy.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libavcodec/proresenc_anatoliy.c
> b/libavcodec/proresenc_anatoliy.c
> index 8bc13fd576..85e8cb3aaa 100644
> --- a/libavcodec/proresenc_anatoliy.c
> +++ b/libavcodec/proresenc_anatoliy.c
> @@ -956,6 +956,7 @@ AVCodec ff_prores_aw_encoder = {
>      .capabilities   = AV_CODEC_CAP_FRAME_THREADS,
>      .priv_class     = &proresaw_enc_class,
>      .profiles       = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
> +    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
>  };
>
>  AVCodec ff_prores_encoder = {
> @@ -971,4 +972,5 @@ AVCodec ff_prores_encoder = {
>      .capabilities   = AV_CODEC_CAP_FRAME_THREADS,
>      .priv_class     = &prores_enc_class,
>      .profiles       = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
> +    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
>  };
> --
> 2.25.1
>
>

Will apply.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 8bc13fd576..85e8cb3aaa 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -956,6 +956,7 @@  AVCodec ff_prores_aw_encoder = {
     .capabilities   = AV_CODEC_CAP_FRAME_THREADS,
     .priv_class     = &proresaw_enc_class,
     .profiles       = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
 
 AVCodec ff_prores_encoder = {
@@ -971,4 +972,5 @@  AVCodec ff_prores_encoder = {
     .capabilities   = AV_CODEC_CAP_FRAME_THREADS,
     .priv_class     = &prores_enc_class,
     .profiles       = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };