summaryrefslogtreecommitdiff
path: root/Python/traceback.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-12-02 20:59:48 +0000
committerRaymond Hettinger <python@rcn.com>2008-12-02 20:59:48 +0000
commitd742886f2bbef1b8bfd81bd5b65ad291f972dcdd (patch)
treedee936fe32d6b1b0a573a6aa7ab35c4c55128097 /Python/traceback.c
parent42a39608a6c2f9459f25c0d4bad565bc9cc6237d (diff)
downloadcpython-d742886f2bbef1b8bfd81bd5b65ad291f972dcdd.tar.gz
Bug #4495: Fix signed/unsigned warning (both namelen and tailen should be signed, not just namelen).
Diffstat (limited to 'Python/traceback.c')
-rw-r--r--Python/traceback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index 63ecc3cb16..42bbd538e2 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -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)