Skip to content

Commit 800348a

Browse files
tobluxmelver
authored andcommitted
kcsan: test: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead. Link: KSPP/linux#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>
1 parent c17b750 commit 800348a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/kcsan/kcsan_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static void probe_console(void *ignore, const char *buf, size_t len)
125125
goto out;
126126

127127
/* No second line of interest. */
128-
strcpy(observed.lines[nlines++], "<none>");
128+
strscpy(observed.lines[nlines++], "<none>");
129129
}
130130
}
131131

@@ -231,7 +231,7 @@ static bool __report_matches(const struct expect_report *r)
231231

232232
if (!r->access[1].fn) {
233233
/* Dummy string if no second access is available. */
234-
strcpy(cur, "<none>");
234+
strscpy(expect[2], "<none>");
235235
break;
236236
}
237237
}

0 commit comments

Comments
 (0)