[FFmpeg-devel] [PATCH 1/5] avformat/mov: Check that sample_count is allocated in mov_parse_heif_items()
Michael Niedermayer
michael at niedermayer.cc
Wed Jun 25 00:19:06 EEST 2025
On Mon, Jun 23, 2025 at 11:43:04AM -0300, James Almer wrote:
> On 6/21/2025 6:15 PM, Michael Niedermayer wrote:
> > Fixes: NULL pointer dereference
> > Fixes: 416811958/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5425269114732544
> >
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> > libavformat/mov.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavformat/mov.c b/libavformat/mov.c
> > index 8a094b1ea0a..6e9e3498fb5 100644
> > --- a/libavformat/mov.c
> > +++ b/libavformat/mov.c
> > @@ -10336,7 +10336,7 @@ static int mov_parse_heif_items(AVFormatContext *s)
> > st->codecpar->height = item->height;
> > err = sanity_checks(s, sc, item->item_id);
> > - if (err)
> > + if (err || !sc->sample_count)
> > return AVERROR_INVALIDDATA;
> > sc->sample_sizes[0] = item->extent_length;
>
> LGTM
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- 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/20250624/5d6b26fb/attachment.sig>
More information about the ffmpeg-devel
mailing list