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.
J
Jeremy Hylton committed
5d3d134d560d24a9e6b9d65dd814542605c0b152
Parent: 4b4ab20