mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-08-18 00:08:59 +00:00
haze: fix pointer overflow check
This commit is contained in:
parent
6c99a828af
commit
3630e10874
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ namespace haze {
|
||||||
|
|
||||||
constexpr bool AllocationIsSatisfyable(size_t n) const {
|
constexpr bool AllocationIsSatisfyable(size_t n) const {
|
||||||
/* Check for overflow. */
|
/* Check for overflow. */
|
||||||
if (this->GetNextAddress() + n < this->GetNextAddress()) {
|
if (!util::CanAddWithoutOverflow(reinterpret_cast<uintptr_t>(this->GetNextAddress()), n)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue