[Python-3000-checkins] r67477 - python/branches/py3k/Python/traceback.c

raymond.hettinger python-3000-checkins at python.org
Tue Dec 2 21:59:48 CET 2008


Author: raymond.hettinger
Date: Tue Dec  2 21:59:48 2008
New Revision: 67477

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

Modified:
   python/branches/py3k/Python/traceback.c

Modified: python/branches/py3k/Python/traceback.c
==============================================================================
--- python/branches/py3k/Python/traceback.c	(original)
+++ python/branches/py3k/Python/traceback.c	Tue Dec  2 21:59:48 2008
@@ -171,7 +171,7 @@
 		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)


More information about the Python-3000-checkins mailing list