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
42 42
43 char *matrix_str[4];43 char *matrix_str[4];
44 44
45 cl_float threshold[4];45 cl_float threshold[AV_VIDEO_MAX_PLANES];
46 cl_int coordinates;46 cl_int coordinates;
47 cl_mem coord;47 cl_mem coord;
48 48
@@ -93,7 +93,7 @@ static int neighbor_opencl_make_filter_params(AVFilterContext *avctx) · 44 unmodified lines
93 cl_int cle;93 cl_int cle;
94 int i;94 int i;
95 95
96 for (i = 0; i < 4; i++) {96 for (i = 0; i < AV_VIDEO_MAX_PLANES; i++) {
97 ctx->threshold[i] /= 255.0;97 ctx->threshold[i] /= 255.0;
98 }98 }
99 99

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