This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.1 in repository ffmpeg.
commit 20ef67735299622089878dd801f3a0924ee2d8dc Author: Michael Niedermayer <[email protected]> AuthorDate: Thu Oct 15 04:29:34 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Sun Nov 15 02:17:06 2026 +0100 avfilter/vf_fieldmatch: stop compare_fields() at the last complete field line Fixes: out of array read Fixes: 8Vo2w4S3WNCd Found during triage/review of the security report 0fHkOzVCAhre Out of array read Replicated through UnModified FFmpeg with ASAN Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit cf725b93523fc3230e7fbf2f20e5c81a0aa9c929) Signed-off-by: Michael Niedermayer <[email protected]> --- libavfilter/vf_fieldmatch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c index 7ce5d23fdb..384714f23d 100644 --- a/libavfilter/vf_fieldmatch.c +++ b/libavfilter/vf_fieldmatch.c @@ -496,7 +496,7 @@ static int compare_fields(FieldMatchContext *fm, int match1, int match2, int fie const AVFrame *src = fm->src; for (plane = 0; plane < (fm->mchroma ? 3 : 1); plane++) { - int x, y, temp1, temp2, fbase; + int x, y, temp1, temp2, fbase, stopy; const AVFrame *prev, *next; uint8_t *mapp = fm->map_data[plane]; int map_linesize = fm->map_linesize[plane]; @@ -519,6 +519,7 @@ static int compare_fields(FieldMatchContext *fm, int match1, int match2, int fie /* match1 */ fbase = get_field_base(match1, field); srcf = srcp + (fbase + 1) * src_linesize; + stopy = height - 1 - fbase; srcpf = srcf - srcf_linesize; srcnf = srcf + srcf_linesize; mapp = mapp + fbase * map_linesize; @@ -544,7 +545,7 @@ static int compare_fields(FieldMatchContext *fm, int match1, int match2, int fie build_diff_map(fm, prvnf, prvf_linesize, nxtnf, nxtf_linesize, mapp + map_linesize, map_linesize, height, width, plane); - for (y = 2; y < height - 2; y += 2) { + for (y = 2; y < stopy; y += 2) { if (y0a == y1a || y < y0a || y > y1a) { for (x = startx; x < stopx; x++) { if (mapp[x] > 0 || mapp[x + map_linesize] > 0) { -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
