Skip to content

Commit

Permalink
Fix possible memory corruption in TArray::Delete(index, count)
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 authored and coelckers committed Mar 22, 2023
1 parent c041b43 commit 9e19134
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/common/utility/tarray.h
Expand Up @@ -453,6 +453,8 @@ class TArray

void Delete (unsigned int index, int deletecount)
{
if(index >= Count) return;

if (index + deletecount > Count)
{
deletecount = Count - index;
Expand Down

0 comments on commit 9e19134

Please sign in to comment.