Rephrase code to avoid overflow

Code was checking for overflow, but by way of doing the overflowing
calculations. changed from 32-bit to 64-bit calculations to avoid
the overflow.

Bug: 145075076
Test: compilation, to be re-fuzzed
Change-Id: Ic14ce8f22b177802c5166c0bab362b12f25ca353
(cherry picked from commit 1c6217859ed2ad0b27df4b73c1dcdcda5aebe3d5)
1 file changed