summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2025-08-15 23:37:44 +0200
committerMarco Elver <elver@google.com>2025-08-19 12:52:12 +0200
commit800348aa34b2bc40d558bb17b6719c51fac0b6de (patch)
tree2cf49ae455dcc389a9c2a4ff7c6bfbb09bb84e15
parentc17b750b3ad9f45f2b6f7e6f7f4679844244f0b9 (diff)
kcsan: test: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Marco Elver <elver@google.com>
-rw-r--r--kernel/kcsan/kcsan_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/kcsan/kcsan_test.c b/kernel/kcsan/kcsan_test.c
index 49ab81faaed9..ea1cb4c8a894 100644
--- a/kernel/kcsan/kcsan_test.c
+++ b/kernel/kcsan/kcsan_test.c
@@ -125,7 +125,7 @@ static void probe_console(void *ignore, const char *buf, size_t len)
goto out;
/* No second line of interest. */
- strcpy(observed.lines[nlines++], "<none>");
+ strscpy(observed.lines[nlines++], "<none>");
}
}
@@ -231,7 +231,7 @@ static bool __report_matches(const struct expect_report *r)
if (!r->access[1].fn) {
/* Dummy string if no second access is available. */
- strcpy(cur, "<none>");
+ strscpy(expect[2], "<none>");
break;
}
}