3
0
Fork 0
forked from suyu/suyu

Merge pull request #10530 from Kelebek1/syncpt_oob

Fix incorrect syncpt id bounds check and potential out of bounds lookup
This commit is contained in:
liamwhite 2023-06-01 09:05:42 -04:00 committed by GitHub
commit 00b6bef65a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {