Use PyOS_vsnprintf() and check its return value.

If it returns -1 (which indicates overflow on old Linux platforms and
perhaps on Windows) or size greater than buffer, write a message
indicating that the previous message was truncated.
1 file changed