Fix _sys_prx_get_module_info p0pt->filename writing with 0 size
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "Utilities/VirtualMemory.h"
|
||||
#include "Utilities/bin_patch.h"
|
||||
#include "Utilities/StrUtil.h"
|
||||
#include "Crypto/sha1.h"
|
||||
#include "Crypto/unself.h"
|
||||
#include "Loader/ELF.h"
|
||||
@@ -942,10 +943,10 @@ std::shared_ptr<lv2_prx> ppu_load_prx(const ppu_prx_object& elf, const std::stri
|
||||
};
|
||||
|
||||
// Access library information (TODO)
|
||||
const auto& lib_info = vm::cptr<ppu_prx_library_info>(vm::cast(prx->segs[0].addr + elf.progs[0].p_paddr - elf.progs[0].p_offset, HERE));
|
||||
const auto& lib_name = std::string(lib_info->name);
|
||||
const vm::cptr<ppu_prx_library_info> lib_info = vm::cast(prx->segs[0].addr + elf.progs[0].p_paddr - elf.progs[0].p_offset, HERE);
|
||||
const std::string lib_name = lib_info->name;
|
||||
|
||||
std::memcpy(prx->module_info_name, lib_info->name, sizeof(prx->module_info_name));
|
||||
strcpy_trunc(prx->module_info_name, lib_name);
|
||||
prx->module_info_version[0] = lib_info->version[0];
|
||||
prx->module_info_version[1] = lib_info->version[1];
|
||||
prx->module_info_attributes = lib_info->attributes;
|
||||
|
||||
Reference in New Issue
Block a user