Commits

Anonymous committed d172dd8

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

Comments (0)

Files changed (1)

Python/traceback.c

 		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)