Prevent possible buffer overflow.