On Thu, Jul 24, 2025 at 08:25:35PM +0200, Tomas Härdin wrote:
> tor 2025-07-24 klockan 00:51 +0200 skrev Marton Balint:
> > 
> > 
> > On Wed, 23 Jul 2025, Tomas Härdin wrote:
> > 
> > > ons 2025-07-23 klockan 13:45 +0200 skrev Michael Niedermayer:
> > > > Fixes: read of uninitialized memory
> > > > Fixes: 391916474/clusterfuzz-testcase-minimized-
> > > > ffmpeg_dem_MXF_fuzzer-4935250956845056
> > > > 
> > > > Found-by: continuous fuzzing process
> > > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > > > Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
> > > > ---
> > > >  libavformat/mxfdec.c | 4 +++-
> > > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> > > > index 0eed13d850d..184e97256cd 100644
> > > > --- a/libavformat/mxfdec.c
> > > > +++ b/libavformat/mxfdec.c
> > > > @@ -491,7 +491,9 @@ static int klv_read_packet(MXFContext *mxf,
> > > > KLVPacket *klv, AVIOContext *pb)
> > > >          return AVERROR_INVALIDDATA;
> > > >  
> > > >      memcpy(klv->key, mxf_klv_key, 4);
> > > > -    avio_read(pb, klv->key + 4, 12);
> > > > +    int ret = ffio_read_size(pb, klv->key + 4, 12);
> > > > +    if (ret < 0)
> > > > +        return ret;
> > > 
> > > ret != 12 is better. If it's non-negative then return AVERROR_EOF
> > 
> > ffio_read_size always returns the requested size or negative.
> 
> Herp. Well in that case it's fine yes

will apply patchset

thx

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

Any man who breaks a law that conscience tells him is unjust and willingly 
accepts the penalty by staying in jail in order to arouse the conscience of 
the community on the injustice of the law is at that moment expressing the 
very highest respect for law. - Martin Luther King Jr

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to