Commit d742886f authored by Raymond Hettinger's avatar Raymond Hettinger

Bug #4495: Fix signed/unsigned warning (both namelen and tailen should be...

Bug #4495:  Fix signed/unsigned warning (both namelen and tailen should be signed, not just namelen).
parent 42a39608
......@@ -171,7 +171,7 @@ _Py_FindSourceFile(const char* filename, char* namebuf, size_t namelen, int open
if (!PyUnicode_Check(v))
continue;
path = _PyUnicode_AsStringAndSize(v, &len);
if (len + 1 + taillen >= (Py_ssize_t)namelen - 1)
if (len + 1 + (Py_ssize_t)taillen >= (Py_ssize_t)namelen - 1)
continue; /* Too long */
strcpy(namebuf, path);
if (strlen(namebuf) != len)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment