summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/kernel/k_capabilities.cpp1
-rw-r--r--src/core/hle/service/nvdrv/core/nvmap.cpp4
-rw-r--r--src/core/hle/service/ssl/ssl_backend_schannel.cpp3
3 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_capabilities.cpp b/src/core/hle/kernel/k_capabilities.cpp
index 90e4e8fb0..e7da7a21d 100644
--- a/src/core/hle/kernel/k_capabilities.cpp
+++ b/src/core/hle/kernel/k_capabilities.cpp
@@ -156,7 +156,6 @@ Result KCapabilities::MapIoPage_(const u32 cap, KPageTable* page_table) {
156 const u64 phys_addr = MapIoPage{cap}.address.Value() * PageSize; 156 const u64 phys_addr = MapIoPage{cap}.address.Value() * PageSize;
157 const size_t num_pages = 1; 157 const size_t num_pages = 1;
158 const size_t size = num_pages * PageSize; 158 const size_t size = num_pages * PageSize;
159 R_UNLESS(num_pages != 0, ResultInvalidSize);
160 R_UNLESS(phys_addr < phys_addr + size, ResultInvalidAddress); 159 R_UNLESS(phys_addr < phys_addr + size, ResultInvalidAddress);
161 R_UNLESS(((phys_addr + size - 1) & ~PhysicalMapAllowedMask) == 0, ResultInvalidAddress); 160 R_UNLESS(((phys_addr + size - 1) & ~PhysicalMapAllowedMask) == 0, ResultInvalidAddress);
162 161
diff --git a/src/core/hle/service/nvdrv/core/nvmap.cpp b/src/core/hle/service/nvdrv/core/nvmap.cpp
index a51ca5444..0ca05257e 100644
--- a/src/core/hle/service/nvdrv/core/nvmap.cpp
+++ b/src/core/hle/service/nvdrv/core/nvmap.cpp
@@ -160,8 +160,8 @@ u32 NvMap::PinHandle(NvMap::Handle::Id handle) {
160 u32 address{}; 160 u32 address{};
161 auto& smmu_allocator = host1x.Allocator(); 161 auto& smmu_allocator = host1x.Allocator();
162 auto& smmu_memory_manager = host1x.MemoryManager(); 162 auto& smmu_memory_manager = host1x.MemoryManager();
163 while (!(address = 163 while ((address = smmu_allocator.Allocate(
164 smmu_allocator.Allocate(static_cast<u32>(handle_description->aligned_size)))) { 164 static_cast<u32>(handle_description->aligned_size))) == 0) {
165 // Free handles until the allocation succeeds 165 // Free handles until the allocation succeeds
166 std::scoped_lock queueLock(unmap_queue_lock); 166 std::scoped_lock queueLock(unmap_queue_lock);
167 if (auto freeHandleDesc{unmap_queue.front()}) { 167 if (auto freeHandleDesc{unmap_queue.front()}) {
diff --git a/src/core/hle/service/ssl/ssl_backend_schannel.cpp b/src/core/hle/service/ssl/ssl_backend_schannel.cpp
index d834a0c1f..212057cfc 100644
--- a/src/core/hle/service/ssl/ssl_backend_schannel.cpp
+++ b/src/core/hle/service/ssl/ssl_backend_schannel.cpp
@@ -477,7 +477,8 @@ public:
477 return ResultInternalError; 477 return ResultInternalError;
478 } 478 }
479 PCCERT_CONTEXT some_cert = nullptr; 479 PCCERT_CONTEXT some_cert = nullptr;
480 while ((some_cert = CertEnumCertificatesInStore(returned_cert->hCertStore, some_cert))) { 480 while ((some_cert = CertEnumCertificatesInStore(returned_cert->hCertStore, some_cert)) !=
481 nullptr) {
481 out_certs->emplace_back(static_cast<u8*>(some_cert->pbCertEncoded), 482 out_certs->emplace_back(static_cast<u8*>(some_cert->pbCertEncoded),
482 static_cast<u8*>(some_cert->pbCertEncoded) + 483 static_cast<u8*>(some_cert->pbCertEncoded) +
483 some_cert->cbCertEncoded); 484 some_cert->cbCertEncoded);