Explorar o código

Merge pull request #10530 from Kelebek1/syncpt_oob

Fix incorrect syncpt id bounds check and potential out of bounds lookup
liamwhite %!s(int64=3) %!d(string=hai) anos
pai
achega
00b6bef65a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/hle/service/nvdrv/core/syncpoint_manager.cpp

+ 1 - 1
src/core/hle/service/nvdrv/core/syncpoint_manager.cpp

@@ -64,7 +64,7 @@ void SyncpointManager::FreeSyncpoint(u32 id) {
 }
 
 bool SyncpointManager::IsSyncpointAllocated(u32 id) const {
-    return (id <= SyncpointCount) && syncpoints[id].reserved;
+    return (id < SyncpointCount) && syncpoints[id].reserved;
 }
 
 bool SyncpointManager::HasSyncpointExpired(u32 id, u32 threshold) const {