[issue6608] asctime causing python to crash

2010-06-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is a quote from the relevant CERT advisory (MSC33-C): """ This function is supposed to output a character string of 26 positions at most, including the terminating zero. If we count the length indicated by the format directives we arrive at 25. Tak

[issue6608] asctime causing python to crash

2010-05-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The patch as written causes buffer overflow for year >= 10,000: >>> len(time.asctime( (1, 1, 1, 0, 0, 0, 0, 1, -1))) 26 >>> len(time.asctime( (10, 1, 1, 0, 0, 0, 0, 1, -1))) 27 while the buffer is only 26 characters: + static char result[2

[issue6608] asctime causing python to crash

2010-05-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17468/issue6608.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue6608] asctime causing python to crash

2010-05-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I have untabified James' patch, ran the tests on the result, but did not otherwise review it. There is a not-so-easy-to-find thread on python-dev discussing this issue under subject "Python 2.6.5". Here is a relevant quote from Martin v. Löwis: """ T

[issue6608] asctime causing python to crash

2010-02-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Retrograding to critical after popular python-dev demand. -- nosy: +pitrou priority: release blocker -> critical ___ Python tracker ___

[issue6608] asctime causing python to crash

2010-02-10 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : -- nosy: +srid ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue6608] asctime causing python to crash

2010-02-09 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brett.cannon, lemburg priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-

[issue6608] asctime causing python to crash

2009-08-02 Thread James Abbatiello
James Abbatiello added the comment: Further investigation shows that MS asctime() doesn't like leap seconds and causes an assertion when passing (2008, 12, 31, 23, 59, 60, 2, 366, -1) -> 'Wed Dec 31 23:59:60 2008'. Given that and since asctime() is such a simple function I think it makes more s

[issue6608] asctime causing python to crash

2009-07-31 Thread James Abbatiello
James Abbatiello added the comment: Since there's no good way to disable the assertion (see issue4804), checking the validity of the argument beforehand looks like an option. The checking that's currently being done in the strftime() implementation looks useful but it is not enough. The checki

[issue6608] asctime causing python to crash

2009-07-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Confirmed. On Windows, the out-of-range value triggers a debugging assertion in the CRT library. -- components: +Extension Modules, Windows -None nosy: +alexandre.vassalotti priority: -> normal stage: -> needs patch versions: +Python 2.7, Python

[issue6608] asctime causing python to crash

2009-07-30 Thread Amir Habibi
New submission from Amir Habibi : I use: Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 import time time.asctime((2009, 1, 1, 24, 0, 0, 0, 0, 0)) the 24 is a wrong parameter but it should'n't crash the engine. This may be the side effect of a more seriou