[C] Fix overflow/conversion errors.