[FFmpeg-devel] [PATCH 1/2] avcodec/jpeg2000dec: Free packed_headers

Michael Niedermayer michael at niedermayer.cc
Sun May 17 00:25:59 EEST 2020


On Sat, May 16, 2020 at 06:55:44PM +0530, Gautam Ramakrishnan wrote:
> On Thu, May 14, 2020 at 2:19 AM Michael Niedermayer
> <michael at niedermayer.cc> wrote:
> >
> > Fixes: memleak
> > Fixes: 21784/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-565256551058636
> >
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> >  libavcodec/jpeg2000dec.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
> > index 460a4ad95c8..65555424ed5 100644
> > --- a/libavcodec/jpeg2000dec.c
> > +++ b/libavcodec/jpeg2000dec.c
> > @@ -2014,6 +2014,8 @@ static void jpeg2000_dec_cleanup(Jpeg2000DecoderContext *s)
> >                  ff_jpeg2000_cleanup(comp, codsty);
> >              }
> >              av_freep(&s->tile[tileno].comp);
> > +            av_freep(&s->tile[tileno].packed_headers);
> > +            s->tile[tileno].packed_headers_size = 0;
> >          }
> >      }
> >      av_freep(&s->tile);
> > --
> > 2.17.1
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 
> Seems to deallocate all data related to the packed_headers.
> Looks good to me.

will apply

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200516/2bd77254/attachment.sig>


More information about the ffmpeg-devel mailing list