• ddchen's avatar
    [wasm] improve handling of malformed inputs · fd2bf837
    ddchen authored
    When reading malformed input, the length of variable-length types can be very large. Computing operand length with this and adding it to PC will overflow and screw up decode.
    
    This patch switches to unsigned int for arity and lengths, terminates loop analysis on error, adds overflow checking to BranchTableOperand, and adds a unit test.
    
    Review-Url: https://codereview.chromium.org/2052623003
    Cr-Commit-Position: refs/heads/master@{#37301}
    fd2bf837
leb-helper-unittest.cc 5.62 KB