From e8adce77402b3c23a2a83c5e87a6d680f6b3dd0a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 11 Jan 2013 23:50:56 +0100 Subject: [PATCH] (rarch_zlib) Use fill_pathname_join - avoid snprintf --- console/rarch_zlib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/console/rarch_zlib.c b/console/rarch_zlib.c index ebb5353955..ca5bc20dd8 100644 --- a/console/rarch_zlib.c +++ b/console/rarch_zlib.c @@ -72,11 +72,11 @@ static int rarch_zlib_extract_file(unzFile uf, { case ZIP_EXTRACT_TO_CURRENT_DIR: case ZIP_EXTRACT_TO_CURRENT_DIR_AND_LOAD_FIRST_FILE: - snprintf(write_filename, write_filename_size, "%s%s", current_dir, filename_inzip); + fill_pathname_join(write_filename, current_dir, filename_inzip, write_filename_size); break; #if defined(HAVE_HDD_CACHE_PARTITION) && defined(RARCH_CONSOLE) case ZIP_EXTRACT_TO_CACHE_DIR: - snprintf(write_filename, write_filename_size, "%s%s", default_paths.cache_dir, filename_inzip); + fill_pathname_join(write_filename, default_paths.cache_dir, filename_inzip, write_filename_size); break; #endif } @@ -199,7 +199,7 @@ int rarch_zlib_extract_archive(const char *zip_path, char *first_file, if (found_first_file) { - snprintf(first_file, first_file_size, write_filename); + strlcpy(first_file, write_filename, first_file_size); RARCH_LOG("first found ZIP file is: %s.\n", write_filename); } }