diff -r e730da0cd489 Python/import.c --- a/Python/import.c Sat Apr 14 16:01:49 2012 +0200 +++ b/Python/import.c Sat Apr 14 19:25:20 2012 +0100 @@ -3409,7 +3409,6 @@ } else { PyObject *parentname, *parent; - Py_ssize_t len; parentname = PyUnicode_Substring(name, 0, subname_start); if (parentname == NULL) { goto error; @@ -3427,8 +3426,8 @@ if (path_list == NULL) PyErr_Clear(); subname_start++; - len = PyUnicode_GET_LENGTH(name) - (subname_start + 1); - subname = PyUnicode_Substring(name, subname_start, len); + subname = PyUnicode_Substring(name, subname_start, + PyUnicode_GET_LENGTH(name)); } if (subname == NULL) goto error;