From 6839341f17326ad932565e7c1a5a07e3d3020da2 Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Wed, 31 May 2023 19:10:00 +0100 Subject: Fix incorrect id check and potential out of bounds lookup --- src/core/hle/service/nvdrv/core/syncpoint_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp b/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp index aba51d280..c4c4c2593 100644 --- a/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp +++ b/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 { -- cgit v1.2.3