[FFmpeg-devel] [PATCH 4/5] avcodec/mpegvideo_dec: Fix lowres=3 field select interlaced mpeg4 frame
Michael Niedermayer
michael at niedermayer.cc
Sun Jul 20 02:00:41 EEST 2025
On Mon, Jul 14, 2025 at 08:52:30PM +0200, Michael Niedermayer wrote:
> On Sun, Jul 13, 2025 at 07:34:50PM +0200, Andreas Rheinhardt wrote:
> > Michael Niedermayer:
> > > Fixes: out of array read in the chroma plane
> > > Fixes: 428034092/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_DEC_fuzzer-5582608941776896.test
> > >
> > > 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/mpegvideo_dec.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c
> > > index 4a54f6cd614..85e24c667e3 100644
> > > --- a/libavcodec/mpegvideo_dec.c
> > > +++ b/libavcodec/mpegvideo_dec.c
> > > @@ -557,7 +557,7 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
> > > ptr_cr = ref_picture[2] + uvsrc_y * uvlinesize + uvsrc_x;
> > >
> > > if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) || uvsrc_y<0 ||
> > > - (unsigned) src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - FFMAX(h, hc<<s->chroma_y_shift), 0)) {
> > > + (unsigned) src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - FFMAX(h, field_select + hc<<s->chroma_y_shift), 0)) {
> > > s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, ptr_y,
> > > linesize >> field_based, linesize >> field_based,
> > > 17, 17 + field_based,
> >
> > Is lowres actually used for mpegvideo-decoders at all (in 2025)?
>
> why not ?
>
> Example: making thumbnails of videos.
> If a video can be decoded in 2min instead of 3min that still allows to scan
> it sooner for potential thumbnails
ok if i apply this ? or you want me to wait ?
iam happy to wait if you want to review/analyze
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Avoid a single point of failure, be that a person or equipment.
-------------- 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/20250720/f9b6c79a/attachment.sig>
More information about the ffmpeg-devel
mailing list