mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 05:30:29 +00:00
Bug 1412097 - Baldr: update MaxFunctionBytes and check everywhere (r=lth)
MozReview-Commit-ID: DZVaYDGqt7L --HG-- extra : rebase_source : 4d6aae6a4537b96927515d80aed39ad03842d25e
This commit is contained in:
parent
5ac85102ae
commit
d04c7d773c
@ -504,7 +504,7 @@ static const unsigned MaxBrTableElems = 1000000;
|
||||
static const unsigned MaxMemoryInitialPages = 16384;
|
||||
static const unsigned MaxMemoryMaximumPages = 65536;
|
||||
static const unsigned MaxModuleBytes = 1024 * 1024 * 1024;
|
||||
static const unsigned MaxFunctionBytes = 128 * 1024;
|
||||
static const unsigned MaxFunctionBytes = 7654321;
|
||||
|
||||
// A magic value of the FramePointer to indicate after a return to the entry
|
||||
// stub that an exception has been caught and that we should throw.
|
||||
|
@ -42,6 +42,9 @@ DecodeFunctionBody(DecoderT& d, ModuleGenerator& mg, uint32_t funcIndex)
|
||||
if (!d.readVarU32(&bodySize))
|
||||
return d.fail("expected number of function body bytes");
|
||||
|
||||
if (bodySize > MaxFunctionBytes)
|
||||
return d.fail("function body too big");
|
||||
|
||||
const size_t offsetInModule = d.currentOffset();
|
||||
|
||||
// Skip over the function body; it will be validated by the compilation thread.
|
||||
|
Loading…
x
Reference in New Issue
Block a user