Merge "Gracefully handle integer overflows." into oc-mr1-dev am: 4d2a8d7203
am: 19f40da9fa

Change-Id: I6a4cec507d8d4eaad65a691e37171359f7fc87c3