History

avfilter/vf_neighbor_opencl: Use AV_PIX_MAX_PLANES

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

Michael Niedermayer committed 2 years ago

Commit 6db4e321 parent ace2e251 file · +2 −2Browse files

Unified · Split

libavfilter/vf_neighbor_opencl.c+2−2
@@ -42,7 +42,7 @@ typedef struct NeighborOpenCLContext { · 41 unmodified lines
4242
4343 char *matrix_str[4];
4444
45− cl_float threshold[4];
45+ cl_float threshold[AV_VIDEO_MAX_PLANES];
4646 cl_int coordinates;
4747 cl_mem coord;
4848
@@ -93,7 +93,7 @@ static int neighbor_opencl_make_filter_params(AVFilterContext *avctx) · 44 unmodified lines
9393 cl_int cle;
9494 int i;
9595
96− for (i = 0; i < 4; i++) {
96+ for (i = 0; i < AV_VIDEO_MAX_PLANES; i++) {
9797 ctx->threshold[i] /= 255.0;
9898 }
9999

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