Fixed a potential null derference issue.

This commit is contained in:
Matthias Koefferlein 2020-04-25 23:06:41 +02:00
parent 4c6d61bed1
commit 8050a54bc8
1 changed files with 1 additions and 1 deletions

View File

@ -526,7 +526,7 @@ PyObject *c2python_func<const char *>::operator() (const char *p)
#if PY_MAJOR_VERSION < 3
return PyString_FromString (s);
#else
PyObject *ret = PyUnicode_DecodeUTF8 (p, strlen (p), NULL);
PyObject *ret = PyUnicode_DecodeUTF8 (s, strlen (s), NULL);
if (ret == NULL) {
check_error ();
}