commit | d79ac373483c36f893981c7319d37a5ebbd63b98 | [log] [tgz] |
---|---|---|
author | Martijn Coenen <maco@google.com> | Wed Jan 22 10:41:03 2020 +0100 |
committer | Martijn Coenen <maco@google.com> | Thu Jan 23 09:45:44 2020 +0100 |
tree | 9d8457219ed275936031e108045fe2020bea70ad | |
parent | d027194efdbe7adceb69955ab2d4d23de7002bdb [diff] |
Fix addition/overflow checks. For unsigned arithmetic, use: (a + b < a) to detect whether a+b wraps (a > c / b) to detect whether a*b > c Bug: 120078455 Test: builds and boots Change-Id: I738b90855b6b9a8effbf55a468c751b6d0b8edd9