From: Tomohiro Kusumi Date: Thu, 5 Jan 2017 17:32:16 +0000 (+0900) Subject: Fix invalid ioengine initialization for cpp_null X-Git-Tag: fio-2.17~21 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=465920381b80d2a6ee472f498e7d7444a310160b;ds=inline Fix invalid ioengine initialization for cpp_null ->name is a pointer now, so it can't be strcpy'd without a valid address set to ->name. Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- diff --git a/engines/null.c b/engines/null.c index f7ba3704..4378f5e2 100644 --- a/engines/null.c +++ b/engines/null.c @@ -142,7 +142,7 @@ void get_ioengine(struct ioengine_ops **ioengine_ptr) *ioengine_ptr = (struct ioengine_ops *) malloc(sizeof(struct ioengine_ops)); ioengine = *ioengine_ptr; - strcpy(ioengine->name, "cpp_null"); + ioengine->name = "cpp_null"; ioengine->version = FIO_IOOPS_VERSION; ioengine->queue = fio_null_queue; ioengine->commit = fio_null_commit;