>>>>> "TP" == Tim Peters <tim.one@home.com> writes: TP> [Jeremy Hylton] >> The uses of PyOS_snprintf() in sysmodule.c actually checks the >> return value. It always checked the sprintf() returned value and >> triggered a Py_FatalError() if the return value was too big. I >> changed it to print a warning message that the output was >> truncated. TP> The test appeared off on both ends to me, so I fiddled this TP> code. Please check the new version against your vision of TP> sanity (my vision: there's nothing special about -1: any return TP> value < 0 is a problem; and there's also a problem if the return TP> value equals the buffer size, since the return value is TP> exclusive of the \0 byte). Definitely correct on the latter. Sensibly conservative on the former. The Linux man pages are silent on negative return values other than -1. Thanks for the fixes. Jeremy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4