Fix a bad bounds check in component trampolines (#4716)

A `GtU` condition needed to actually be `GeU`, as the comment right
above it stated but apparently I forgot to translate the comment to
actual code. This fixes a fuzz bug that arose from oss-fuzz over the
weekend.
This commit is contained in:
Alex Crichton
2022-08-16 09:20:45 -05:00
committed by GitHub
parent 0f944937c0
commit 1e12645ab1
2 changed files with 28 additions and 4 deletions

View File

@@ -1574,7 +1574,7 @@ impl Compiler<'_, '_> {
// If the byte size of memory is greater than the final address of the
// string then the string is invalid. Note that if it's precisely equal
// then that's ok.
self.instruction(I64GtU);
self.instruction(I64GeU);
self.instruction(BrIf(1));
self.instruction(End);