diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-03 09:30:51 +0200 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-03 09:30:51 +0200 |
| commit | f8bf9e370f256d0c50127046a6aa9cb9172bb83c (patch) | |
| tree | 49a77747ca6a66ba6be2ca033a69c2a2c0a8e74e /Python/thread.c | |
| parent | 1b9e42530b6406252fdbab73ab52dbf9e51a3421 (diff) | |
| parent | ee72ac6e35df0db14bfc93642b2f326266d897ae (diff) | |
| download | cpython-f8bf9e370f256d0c50127046a6aa9cb9172bb83c.tar.gz | |
Issue #23099: Closing io.BytesIO with exported buffer is rejected now to
prevent corrupting exported buffer.
Diffstat (limited to 'Python/thread.c')
| -rw-r--r-- | Python/thread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/thread.c b/Python/thread.c index 4e695aeca2..44c071eafe 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(); |
