Eric Smith <e...@trueblade.com> added the comment:

There's an error in time_ctime where it expects the length of the string to be 
fixed:

    if (p[24] == '\n')
        p[24] = '\0';

It doesn't count on the year having 5 digits. It should probably say (untested):
    l = len(p);
    if (l > 0 && p[l-1] == '\n')
        p[l-1] = '\0';

I'll whip up a patch and some tests. I'm not sure if the tests will work on 
platforms other than Linux. I'll see what I can find out about ctime and large 
values.

----------
nosy: +eric.smith

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10563>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to