[issue24917] time_strftime() Buffer Over-read

Alexander Belopolsky report at bugs.python.org
Sat Sep 5 03:49:29 CEST 2015


Alexander Belopolsky added the comment:

Hmm, on Mac OSX "%" and "A%" are valid format strings:

>>> time.strftime("%")
'%'
>>> time.strftime("A%")
'A%'

Mark's experiments show that on Windows they are not. What about the other platforms affected by the patch?  I am concerned about the bottom part of the patch.

A nitpick: an existing error message is "Invalid format string".  I would either reuse it or make it "Incomplete format string".

----------

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


More information about the Python-bugs-list mailing list