Fix integer overflows in computing poc and pic numbers

Test: poc in bug
Bug: 135303936
Bug: 136568141

Change-Id: Ie426c678b60f2d078d0b39e73a44d42d931d7fe3
3 files changed