Message ID | 20240705002156.1964272-12-michael@niedermayer.cc |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,01/15] avcodec/xsubdec: Check parse_timecode() | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | fail | Make fate failed |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavcodec/me_cmp.c b/libavcodec/me_cmp.c index 592ee760840..f3e2f2482ef 100644 --- a/libavcodec/me_cmp.c +++ b/libavcodec/me_cmp.c @@ -517,7 +517,7 @@ av_cold int ff_set_cmp(const MECmpContext *c, me_cmp_func *cmp, int type, int mp cmp[i] = zero_cmp; return 0; } - if (type > FF_ARRAY_ELEMS(cmp_func_list) || + if (type >= FF_ARRAY_ELEMS(cmp_func_list) || !cmp_func_list[type].available || !mpvenc && cmp_func_list[type].mpv_only) { av_log(NULL, AV_LOG_ERROR,
Fixes: CID1604375 Out-of-bounds read Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/me_cmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)