• 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
loop-assignment-analysis-unittest.cc 5.81 KB