Issue #15989: Fixed some scarcely probable integer overflows.
It is very unlikely that they can occur in real code for now.
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
index 1c2d3a0..7428aed 100644
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -238,7 +238,8 @@
     int text = 0, binary = 0, universal = 0;
 
     char rawmode[6], *m;
-    int line_buffering, isatty;
+    int line_buffering;
+    long isatty;
 
     PyObject *raw, *modeobj = NULL, *buffer, *wrapper, *result = NULL;