[issue8013] time.asctime segfaults when given a time in the far future

Alexander Belopolsky report at bugs.python.org
Mon Jan 3 00:18:50 CET 2011


Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:

On Sun, Jan 2, 2011 at 6:10 PM, Georg Brandl <report at bugs.python.org> wrote:
..
> All right, then I wonder why your checktm() doesn't check the tm_year?

It is not mine.  I thought it did.  I might have missed that when I
reviewed the patch or there was a reason for that at the time.  Note
that there is a comment that says:

"""
tm_year: [0, max(int)] (1)
..
(1) gettmarg() handles bounds-checking.
"""

If you are ok with introducing stricter bounds checking in beta, I'll
try to get to the bottom of it shortly.

----------

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


More information about the Python-bugs-list mailing list