Check for overflow when converting from size_t to 'int'.