[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-04-01 Thread Martin v. Löwis
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()

[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-04-01 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5627 ___ ___ Python-bugs-list

[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-04-01 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5627 ___ ___ Python-bugs-list

[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-04-01 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Closing. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5627 ___ ___

[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-03-31 Thread Euler Taveira de Oliveira
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

[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-03-31 Thread Euler Taveira de Oliveira
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()

[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-03-31 Thread Georg Brandl
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

[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-03-31 Thread Euler Taveira de Oliveira
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. -- ___