mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:47:44 +00:00
LibWasm: Allow Limits max value to be equal to 2^k-1
That value fits in k bits, so we should allow it.
This commit is contained in:
parent
612d5f201a
commit
18c5b0f1cc
1 changed files with 1 additions and 1 deletions
|
@ -305,7 +305,7 @@ ErrorOr<void, ValidationError> Validator::validate(Limits const& limits, size_t
|
||||||
{
|
{
|
||||||
auto bound = (1ull << k) - 1;
|
auto bound = (1ull << k) - 1;
|
||||||
auto check_bound = [bound](auto value) {
|
auto check_bound = [bound](auto value) {
|
||||||
return static_cast<u64>(value) < bound;
|
return static_cast<u64>(value) <= bound;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!check_bound(limits.min()))
|
if (!check_bound(limits.min()))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue