From 465920381b80d2a6ee472f498e7d7444a310160b Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Fri, 6 Jan 2017 02:32:16 +0900 Subject: [PATCH] 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 --- engines/null.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.25.1