This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eulerto
Recipients eulerto
Date 2009-03-31.16:47:10
SpamBayes Score 8.55158e-06
Marked as misclassified No
Message-id <>
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 and strlen() fails.

I don't know what is the best fix but we have two possibilities:

(i) check the second argument in PyDict_SetItemString() before calling
PyString_FromString() and returns null if that argument is null;
(ii) replace the assert() in PyString_FromString() to 'if (str == NULL)
return NULL;'.

This bug was reported as a PostgreSQL bug at [1].

Date User Action Args
2009-03-31 16:47:14eulertosetrecipients: + eulerto
2009-03-31 16:47:13eulertosetmessageid: <>
2009-03-31 16:47:11eulertolinkissue5627 messages
2009-03-31 16:47:10eulertocreate