From 5aaf4150e2e365b8cb64ad50a5df611f49d96ec1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 24 Mar 2021 17:26:34 +0100 Subject: [PATCH] (file_path.c) Use strlcpy for these instead of snprintf --- libretro-common/file/file_path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretro-common/file/file_path.c b/libretro-common/file/file_path.c index 1346fc2c76..bb9137ef17 100644 --- a/libretro-common/file/file_path.c +++ b/libretro-common/file/file_path.c @@ -509,7 +509,7 @@ void path_basedir(char *path) if (last) last[1] = '\0'; else - snprintf(path, 3, "." PATH_DEFAULT_SLASH()); + strlcpy(path, "." PATH_DEFAULT_SLASH(), 3); } /** @@ -1189,7 +1189,7 @@ void path_basedir_wrapper(char *path) if (last) last[1] = '\0'; else - snprintf(path, 3, "." PATH_DEFAULT_SLASH()); + strlcpy(path, "." PATH_DEFAULT_SLASH(), 3); } #if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL)