Fix handle allocator (#8970)
Use the right type for the index to prevent the value from being truncated.
This commit is contained in:
@@ -204,7 +204,7 @@ public:
|
||||
} else {
|
||||
// check for heap handle use-after-free
|
||||
if (UTILS_UNLIKELY(!mUseAfterFreeCheckDisabled)) {
|
||||
uint8_t const index = (handle.getId() & HANDLE_INDEX_MASK);
|
||||
HandleBase::HandleId const index = (handle.getId() & HANDLE_INDEX_MASK);
|
||||
// if we've already handed out this handle index before, it's definitely a
|
||||
// use-after-free, otherwise it's probably just a corrupted handle
|
||||
if (index < mId) {
|
||||
|
||||
Reference in New Issue
Block a user