From fa134337d9c471d187ca69abf97b44456b38ee1e Mon Sep 17 00:00:00 2001 From: Zion Nimchuk Date: Tue, 9 Oct 2018 21:59:33 -0700 Subject: [PATCH] Fix issue with memory validation --- rpcs3/Loader/TRP.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rpcs3/Loader/TRP.cpp b/rpcs3/Loader/TRP.cpp index 23d81c3067..50cf86c20d 100644 --- a/rpcs3/Loader/TRP.cpp +++ b/rpcs3/Loader/TRP.cpp @@ -2,6 +2,7 @@ #include "Emu/System.h" #include "TRP.h" #include "Crypto/sha1.h" +#include "Utilities/StrUtil.h" TRPLoader::TRPLoader(const fs::file& f) : trp_f(f) @@ -141,11 +142,11 @@ void TRPLoader::RemoveEntry(const char *filename) void TRPLoader::RenameEntry(const char *oldname, const char *newname) { - for (const TRPEntry& entry : m_entries) + for (TRPEntry& entry : m_entries) { if (!strcmp(entry.name, oldname)) { - memcpy((void*)entry.name, newname, 32); + strcpy_trunc(entry.name, newname); } } }