mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-23 04:41:12 +00:00
kern: fix bugs in Receive/Exchange ipc buffers
This commit is contained in:
parent
095fc6b996
commit
84d8634938
2 changed files with 2 additions and 2 deletions
|
@ -400,7 +400,7 @@ namespace ams::kern {
|
|||
/* If this is our first lock, update our permissions. */
|
||||
if (new_lock_count == 1) {
|
||||
MESOSPHERE_ASSERT(this->original_perm == KMemoryPermission_None);
|
||||
MESOSPHERE_ASSERT((this->perm | new_perm) == this->perm);
|
||||
MESOSPHERE_ASSERT((this->perm | new_perm | KMemoryPermission_NotMapped) == (this->perm | KMemoryPermission_NotMapped));
|
||||
MESOSPHERE_ASSERT((this->perm & KMemoryPermission_UserExecute) != KMemoryPermission_UserExecute || (new_perm == KMemoryPermission_UserRead));
|
||||
this->original_perm = this->perm;
|
||||
this->perm = static_cast<KMemoryPermission>((new_perm & KMemoryPermission_IpcLockChangeMask) | (this->original_perm & ~KMemoryPermission_IpcLockChangeMask));
|
||||
|
|
|
@ -2169,7 +2169,7 @@ namespace ams::kern {
|
|||
std::memcpy(GetVoidPointer(end_partial_page), GetVoidPointer(GetHeapVirtualAddress(cur_block_addr)), copy_size);
|
||||
std::memset(GetVoidPointer(end_partial_page + copy_size), fill_val, PageSize - copy_size);
|
||||
} else {
|
||||
std::memset(GetVoidPointer(start_partial_page), fill_val, PageSize);
|
||||
std::memset(GetVoidPointer(end_partial_page), fill_val, PageSize);
|
||||
}
|
||||
|
||||
/* Map the page. */
|
||||
|
|
Loading…
Reference in a new issue