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>
This commit is contained in:
Thorsten Blum 2025-08-15 23:37:44 +02:00 committed by Marco Elver
parent c17b750b3a
commit 800348aa34
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}