[New-bugs-announce] [issue3705] py3k aborts if "-c" or "-m" is given a non-ascii value

Antoine Pitrou report at bugs.python.org
Wed Aug 27 20:05:41 CEST 2008


New submission from Antoine Pitrou <pitrou at free.fr>:

The explanation is quite simple: in Py_Main, the arguments are converted
from wide to byte strings, but the required length of the byte string is
assumed equal to that of the wide string.

Which gives:

$ ./python -c "print('à')"
Fatal Python error: not enough memory to copy -c argument
Erreur de segmentation (core dumped)
$ ./python -m à
Fatal Python error: not enough memory to copy -m argument
Erreur de segmentation (core dumped)

----------
messages: 72036
nosy: pitrou
severity: normal
status: open
title: py3k aborts if "-c" or "-m" is given a non-ascii value
type: crash
versions: Python 3.0

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


More information about the New-bugs-announce mailing list