From 20c11b29b3a63c221cac942a17bf9abcf8b9bafe Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 3 Mar 2025 16:22:38 -0500 Subject: [PATCH] Use strlcpy() instead of strcpy() --- files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files.c b/files.c index afce285..f7910a5 100644 --- a/files.c +++ b/files.c @@ -63,7 +63,7 @@ public file_t *load_file(file_t **files, const char *filename) // Check for : if (strrchr(filename, ':')) { char tmp[PATH_MAX] = {0}; - strcpy(tmp, filename); + strlcpy(tmp, filename, sizeof(tmp)); char *colon = strrchr(tmp, ':'); *colon = '\0'; file_t *f = load_file(files, tmp);