summaryrefslogtreecommitdiff
path: root/src/ir/possible-contents.cpp
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2022-11-11 12:08:08 -0800
committerGitHub <noreply@github.com>2022-11-11 20:08:08 +0000
commitcf908c7976d02a9d3d4810a2b5a04e502e4efed2 (patch)
treeac04d8c683903cc76b6e95668bf850f03f9b4be8 /src/ir/possible-contents.cpp
parent3928189214e03430bbc9f2b51c6af3887b465160 (diff)
downloadbinaryen-cf908c7976d02a9d3d4810a2b5a04e502e4efed2.tar.gz
binaryen-cf908c7976d02a9d3d4810a2b5a04e502e4efed2.tar.bz2
binaryen-cf908c7976d02a9d3d4810a2b5a04e502e4efed2.zip
Fix two fuzz bugs with ArrayNewSeg (#5242)
First, we forgot to note the type annotation on `ArrayNewSeg` instructions, so in small modules where these are the only annotated instructions, the type section would be incomplete. Second, in the interpreter we were reserving space for the array before checking that the segment access was valid. This could cause huge allocations that threw bad_alloc exceptions before the interpreter could get around to trapping. Fix the problem by reserving the array after validating the arguements. Fixes #5236.
Diffstat (limited to 'src/ir/possible-contents.cpp')
0 files changed, 0 insertions, 0 deletions