summaryrefslogtreecommitdiff
path: root/Python/thread.c
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-09-13 23:40:27 -0700
committerNed Deily <nad@acm.org>2014-09-13 23:40:27 -0700
commit4278e8cf357c7418651ca0e23346b2ddec74edce (patch)
treea3c23ca1ef525340d98e01bb53fc9e6785ce45ff /Python/thread.c
parent0d48f974662035c14912d225b71b6cf93b621bb0 (diff)
parent0675102eeb39b5bf471af40e8af6729102fccc6b (diff)
downloadcpython-4278e8cf357c7418651ca0e23346b2ddec74edce.tar.gz
Issue #22168: Prevent turtle AttributeError with non-default Canvas on OS X.
Diffstat (limited to 'Python/thread.c')
-rw-r--r--Python/thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/thread.c b/Python/thread.c
index d1cb0e6f9d..9eb5d12f50 100644
--- a/Python/thread.c
+++ b/Python/thread.c
@@ -431,7 +431,7 @@ PyThread_GetInfo(void)
&& defined(_CS_GNU_LIBPTHREAD_VERSION))
value = NULL;
len = confstr(_CS_GNU_LIBPTHREAD_VERSION, buffer, sizeof(buffer));
- if (1 < len && len < sizeof(buffer)) {
+ if (1 < len && (size_t)len < sizeof(buffer)) {
value = PyUnicode_DecodeFSDefaultAndSize(buffer, len-1);
if (value == NULL)
PyErr_Clear();