X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=cmdutils_opencl.c;h=61478e27af9df7f5a8b76280bc47f5175144359e;hb=51f7ba9ceec0053ee9c1ad900e1e0a49d3008137;hp=3dfd156195eaae3484068034791b7130c94ac46e;hpb=cea62a90c0b76d872f5dea554a4ef8f08a1654b6;p=ffmpeg diff --git a/cmdutils_opencl.c b/cmdutils_opencl.c index 3dfd156195e..61478e27af9 100644 --- a/cmdutils_opencl.c +++ b/cmdutils_opencl.c @@ -22,6 +22,7 @@ #include "libavutil/time.h" #include "libavutil/log.h" #include "libavutil/opencl.h" +#include "libavutil/avstring.h" #include "cmdutils.h" typedef struct { @@ -238,7 +239,8 @@ int opt_opencl_bench(void *optctx, const char *opt, const char *arg) devices[count].platform_idx = i; devices[count].device_idx = j; devices[count].runtime = score; - strcpy(devices[count].device_name, device_node->device_name); + av_strlcpy(devices[count].device_name, device_node->device_name, + sizeof(devices[count].device_name)); count++; } }