Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 46084ba

Browse files
author
Victor Stinner
committed
Fix find_module_path(): make the string ready
1 parent c729b8e commit 46084ba

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Python/import.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,6 +1785,9 @@ find_module_path(PyObject *fullname, PyObject *name, PyObject *path,
17851785
else
17861786
return 0;
17871787

1788+
if (PyUnicode_READY(path_unicode))
1789+
return -1;
1790+
17881791
len = PyUnicode_GET_LENGTH(path_unicode);
17891792
if (!PyUnicode_AsUCS4(path_unicode, buf, Py_ARRAY_LENGTH(buf), 1)) {
17901793
Py_DECREF(path_unicode);

0 commit comments

Comments
 (0)