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 christian.heimes
Recipients christian.heimes, larry, serhiy.storchaka
Date 2014-02-04.23:09:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391555352.52.0.553421944384.issue20515@psf.upfronthosting.co.za>
In-reply-to
Content
varname_converter() doesn't check the return value of PyUnicode_AsUTF8AndSize() for NULL. The bug was introduced by http://hg.python.org/cpython/rev/321b714653e3 / issue #20368

3. returned_null: Function "PyUnicode_AsUTF8AndSize(PyObject *, Py_ssize_t *)" returns null (checked 28 out of 30 times).[show details]
4. var_assigned: Assigning: "s" = null return value from "PyUnicode_AsUTF8AndSize(PyObject *, Py_ssize_t *)".
1399        s = PyUnicode_AsUTF8AndSize(in, &size);
5. Condition "size > 2147483647", taking false branch
1400        if (size > INT_MAX) {
1401            PyErr_SetString(PyExc_OverflowError, "string is too long");
1402            return 0;
1403        }
CID 1167595 (#1 of 1): Dereference null return value (NULL_RETURNS)6. dereference: Dereferencing a pointer that might be null "s" when calling "strlen(char const *)"
1404        if (strlen(s) != size) {
History
Date User Action Args
2014-02-04 23:09:12christian.heimessetrecipients: + christian.heimes, larry, serhiy.storchaka
2014-02-04 23:09:12christian.heimessetmessageid: <1391555352.52.0.553421944384.issue20515@psf.upfronthosting.co.za>
2014-02-04 23:09:12christian.heimeslinkissue20515 messages
2014-02-04 23:09:12christian.heimescreate