[*] sanitize these AuByteBuffer utilities to prevent exploitation
This commit is contained in:
parent
cc317882e9
commit
e4e3e70be2
@ -203,6 +203,16 @@ namespace Aurora::Memory
|
||||
pBase = this->readPtr;
|
||||
}
|
||||
|
||||
if (pBase + uCount > this->base + this->length)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
if (pBase < this->base)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
return MemoryViewRead(pBase, uCount);
|
||||
}
|
||||
|
||||
@ -241,6 +251,16 @@ namespace Aurora::Memory
|
||||
pBase = this->writePtr;
|
||||
}
|
||||
|
||||
if (pBase + uCount > this->base + this->length)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
if (pBase < this->base)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
return MemoryViewWrite(pBase, uCount);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user