Fix addition/overflow checks. am: b022196fb6

Change-Id: I6994ec314617acabed4829e828fc07b5282ddc76