[FFmpeg-devel] [PATCH 1/3] avcodec/jpeg2000htdec: Avoid freeing uninitialized pointers in ff_jpeg2000_decode_htj2k()
Michael Niedermayer
michael at niedermayer.cc
Thu Aug 3 18:36:29 EEST 2023
On Thu, Aug 03, 2023 at 10:20:29AM +0200, Tomas Härdin wrote:
> ons 2023-08-02 klockan 02:01 +0200 skrev Michael Niedermayer:
> > Fixes: freeing of uninitialized pointers
> > Fixes: part of 58299
> >
> > 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/jpeg2000htdec.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavcodec/jpeg2000htdec.c b/libavcodec/jpeg2000htdec.c
> > index 4c4e54710d..2b082b3b2f 100644
> > --- a/libavcodec/jpeg2000htdec.c
> > +++ b/libavcodec/jpeg2000htdec.c
> > @@ -1174,8 +1174,8 @@ ff_jpeg2000_decode_htj2k(const
> > Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c
> > int ret;
> >
> > /* Temporary buffers */
> > - int32_t *sample_buf;
> > - uint8_t *block_states;
> > + int32_t *sample_buf = NULL;
> > + uint8_t *block_states = NULL;
>
> Looks OK
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230803/4467e13e/attachment.sig>
More information about the ffmpeg-devel
mailing list