Signed integer overflows can happen in three distinct places. This fixes it so an error happens when an overflow is observed. Signed-off-by: David Korczynski <david@adalogics.com>