Martin v. Löwis mar...@v.loewis.de added the comment:
Martin, do you have any insight into this
Are you sure you commenting into the right issue?
How does Py_ssize_t come into play here?
--
title: PyDict_SetItemString() fails when the second argument is null -
PyDict_SetItemString()
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5627
___
___
Python-bugs-list
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5627
___
___
Python-bugs-list
Georg Brandl ge...@python.org added the comment:
Closing.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5627
___
___
New submission from Euler Taveira de Oliveira eu...@timbira.com:
PyDict_SetItemString() fails when the second argument (key) is null
pointer. It occurs because PyString_FromString(key) call doesn't check
for null pointer and if we're in a disabled assert environment the
assert() is not caught
Euler Taveira de Oliveira eu...@timbira.com added the comment:
It seems PyDict_DelItemString() and PyDict_SetItem() suffer from the
same disease. :( Both use assert() to detect a null pointer but fail to
prevent it. As I stated in the previous comment, maybe the right fix is
to replace assert()
Georg Brandl ge...@python.org added the comment:
I am not sure why you consider this a bug. You should certainly not pass
NULL pointers around where the docs do not explicitly allow this.
--
nosy: +georg.brandl
resolution: - wont fix
status: open - pending
Euler Taveira de Oliveira eu...@timbira.com added the comment:
I know that it is a good programming practice checking null pointers but
sometimes programmers are lazy. ;) I still think that high level
functions should check for null pointers.
--
___