diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-06-13 00:22:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-07-15 01:59:40 +0200 |
commit | 19a5a8997c93d72d6fe169c42a2a04ad4bb6e03a (patch) | |
tree | 9e0033a5defdcf8b7b874d4c05ff6551e0cda5de /libavfilter/vf_convolution_opencl.c | |
parent | ec18ec9fc1080c37a02f3709afda5c4b08d4ea89 (diff) | |
download | ffmpeg-19a5a8997c93d72d6fe169c42a2a04ad4bb6e03a.tar.gz |
avfilter/vf_convolution_opencl: Assert that the filter name is one of the filters
Helps with: CID1439572 Uninitialized pointer read
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/vf_convolution_opencl.c')
-rw-r--r-- | libavfilter/vf_convolution_opencl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/vf_convolution_opencl.c b/libavfilter/vf_convolution_opencl.c index 0eff9f40d3..40938436f2 100644 --- a/libavfilter/vf_convolution_opencl.c +++ b/libavfilter/vf_convolution_opencl.c @@ -20,6 +20,7 @@ #include "config_components.h" +#include "libavutil/avassert.h" #include "libavutil/common.h" #include "libavutil/imgutils.h" #include "libavutil/mem.h" @@ -80,6 +81,8 @@ static int convolution_opencl_init(AVFilterContext *avctx) kernel_name = "prewitt_global"; } else if (!strcmp(avctx->filter->name, "roberts_opencl")){ kernel_name = "roberts_global"; + } else { + av_assert0(0); } ctx->kernel = clCreateKernel(ctx->ocf.program, kernel_name, &cle); CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to create " |