History

avcodec/mpegvideo_dec: Fix lowres=3 field select interlaced mpeg4 frame

Fixes: out of array read in the chroma plane Fixes: 428034092/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_DEC_fuzzer-5582608941776896.test

Michael Niedermayer committed 1 year ago

Commit b849ac01 parent 2d64d111 file · +1 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/mpegvideo_dec.c+1−1
@@ -557,7 +557,7 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s, · 556 unmodified lines
557 ptr_cr = ref_picture[2] + uvsrc_y * uvlinesize + uvsrc_x;557 ptr_cr = ref_picture[2] + uvsrc_y * uvlinesize + uvsrc_x;
558 558
559 if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) || uvsrc_y<0 ||559 if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) || uvsrc_y<0 ||
560 (unsigned) src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - FFMAX(h, hc<<s->chroma_y_shift), 0)) {560 (unsigned) src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - FFMAX(h, field_select + hc<<s->chroma_y_shift), 0)) {
561 s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, ptr_y,561 s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, ptr_y,
562 linesize >> field_based, linesize >> field_based,562 linesize >> field_based, linesize >> field_based,
563 17, 17 + field_based,563 17, 17 + field_based,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t