mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-06-03 22:45:00 -06:00
Kernel.Vmm: Fix protection check for file mappings (#4388)
This commit is contained in:
parent
05ccc586ff
commit
d3597c7f18
@ -702,7 +702,7 @@ s32 MemoryManager::MapFile(void** out_addr, VAddr virtual_addr, u64 size, Memory
|
||||
|
||||
handle = file->f.GetFileMapping();
|
||||
|
||||
if (False(file->f.GetAccessMode() & Common::FS::FileAccessMode::Write) ||
|
||||
if (False(file->f.GetAccessMode() & Common::FS::FileAccessMode::Write) &&
|
||||
False(file->f.GetAccessMode() & Common::FS::FileAccessMode::Append)) {
|
||||
// If the file does not have write access, ensure prot does not contain write
|
||||
// permissions. On real hardware, these mappings succeed, but the memory cannot be
|
||||
|
||||
Loading…
Reference in New Issue
Block a user