[issue20948] -Wformat=2 -Wformat-security findings

STINNER Victor report at bugs.python.org
Tue Nov 18 21:48:51 CET 2014


STINNER Victor added the comment:

The format parameter passed to sprintf() is created by makefmt() function. In Python 3.5, makefmt() has a few parameters. The code is simple and looks safe.

The makefmt() function was much more complex in Python 3.3, it had more parameters: zeropad, width and precision. I refactored PyUnicode_FromFormatV() to optimize it. During the optimization, makefmt() was simplified, and in fact it is now possible to inline it and remove it. I just removed it in Python 3.5.

Should we change something in Python 2.7 and 3.4? Ignore the warning? Or can I just close the issue?

Thanks for the report Jeffrey.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20948>
_______________________________________


More information about the Python-bugs-list mailing list