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: Ic4f4d44f7c0656caa115f90f4cfa130192914949
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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: Ic4f4d44f7c0656caa115f90f4cfa130192914949
mentioned in commit 93fe5184