mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-11-17 19:44:36 +01:00
Kernel.Vmm: Fix protection check for file mappings (#4388)
This commit is contained in:
1 parent
05ccc586ff
commit
d3597c7f18
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user