X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=ioengines.c;h=96a96360750038ea87909c8fdfd45f36a89c9d13;hp=115e6f2c7c96ae22322225f0c2097aa8ab9418e0;hb=92b586f8ec428c23a88eea838afadc00331d4bb4;hpb=858a3d476060cfb1ea5dfbdffd94ed3108f194eb diff --git a/ioengines.c b/ioengines.c index 115e6f2c..96a96360 100644 --- a/ioengines.c +++ b/ioengines.c @@ -42,13 +42,13 @@ static int check_engine_ops(struct ioengine_ops *ops) return 0; } -struct ioengine_ops *load_ioengine(struct thread_data *td, char *name) +struct ioengine_ops *load_ioengine(struct thread_data *td, const char *name) { char engine[16], engine_lib[256]; struct ioengine_ops *ops, *ret; void *dlhandle; - strcpy(engine, name); + strncpy(engine, name, sizeof(engine) - 1); /* * linux libaio has alias names, so convert to what we want