avfilter/vf_neighbor_opencl: Use AV_PIX_MAX_PLANES

Fix/Robustness/whatever: CID1439575 Out-of-bounds read

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.1
Michael Niedermayer 7 months ago
parent ace2e25720
commit 6db4e326c2
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 4
      libavfilter/vf_neighbor_opencl.c

@ -42,7 +42,7 @@ typedef struct NeighborOpenCLContext {
char *matrix_str[4];
cl_float threshold[4];
cl_float threshold[AV_VIDEO_MAX_PLANES];
cl_int coordinates;
cl_mem coord;
@ -93,7 +93,7 @@ static int neighbor_opencl_make_filter_params(AVFilterContext *avctx)
cl_int cle;
int i;
for (i = 0; i < 4; i++) {
for (i = 0; i < AV_VIDEO_MAX_PLANES; i++) {
ctx->threshold[i] /= 255.0;
}

Loading…
Cancel
Save