Fix a couple of integer overflows.

CID 1224562, CID 1224564.