Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab62051 commit 560a79fCopy full SHA for 560a79f
1 file changed
Python/importdl.c
@@ -42,6 +42,9 @@ get_encoded_name(PyObject *name, const char **hook_prefix) {
42
43
/* Get the short name (substring after last dot) */
44
name_len = PyUnicode_GetLength(name);
45
+ if (name_len < 0) {
46
+ return NULL;
47
+ }
48
lastdot = PyUnicode_FindChar(name, '.', 0, name_len, -1);
49
if (lastdot < -1) {
50
return NULL;
0 commit comments