Discussion:
[Python-3000-checkins] r67477 - python/branches/py3k/Python/traceback.c
raymond.hettinger
2008-12-02 20:59:48 UTC
Permalink
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)

Loading...