Do the INT_MAX check only where size_t is converted to 'int'.