Fix integer overflows in computing poc and pic numbers am: 1d672d2bea
am: f2157c2dc1

Change-Id: I08c7c4b336aa28c9f7499491214668b2708f6e6b