Commit 800348aa authored by Thorsten Blum's avatar Thorsten Blum Committed by Marco Elver
Browse files

kcsan: test: Replace deprecated strcpy() with strscpy()

strcpy() is deprecated; use strscpy() instead.

Link: https://github.com/KSPP/linux/issues/88


Signed-off-by: default avatarThorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: default avatarJustin Stitt <justinstitt@google.com>
Signed-off-by: default avatarMarco Elver <elver@google.com>
parent c17b750b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
			}
		}