[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

2012-10-04 Thread Viktor Chynarov

New submission from Viktor Chynarov:

If a that has a negative tm_hour is passed as an argument to time.asctime(), 
Python crashes. 

>>> initial_struct_time = [tm for tm in time.localtime()]
>>> initial_struct_time[3] = -1
>>> faulty_time = time.asctime(initial_struct_time)

--
components: Library (Lib)
messages: 172005
nosy: Viktor.Chynarov
priority: normal
severity: normal
status: open
title: Using time.asctime() with an array with negative tm_hour causes Python 
Crash.
type: crash
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue16137>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

2012-10-04 Thread Viktor Chynarov

Viktor Chynarov added the comment:

If an array created from a struct_time that has a negative tm_hour is passed as 
an argument to time.asctime(), Python crashes. 

>>> initial_struct_time = [tm for tm in time.localtime()]
>>> initial_struct_time[3] = -1
>>> faulty_time = time.asctime(initial_struct_time)

--

___
Python tracker 
<http://bugs.python.org/issue16137>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

2012-10-05 Thread Viktor Chynarov

Viktor Chynarov added the comment:

Serhiy, when I use a large number, Python also crashes.

>>> initial_struct_time = [tm for tm in time.localtime()]
>>> initial_struct_time[3] = 101
>>> faulty_time = time.asctime(initial_struct_time)

The above code leads to crash.

My Python version information and computer architecture are shown below:
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on 
win32

--

___
Python tracker 
<http://bugs.python.org/issue16137>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com