check for errors after PyLong_Ssize_t

patch from Victor Stinner #3977
reviewed by Amaury
diff --git a/Modules/_stringio.c b/Modules/_stringio.c
index 83fc79e..d29fe64 100644
--- a/Modules/_stringio.c
+++ b/Modules/_stringio.c
@@ -177,6 +177,10 @@
 
     if (PyLong_Check(arg)) {
         size = PyLong_AsSsize_t(arg);
+        if (size == -1 && PyErr_Occurred())
+            return NULL;
+        if (size == -1 && PyErr_Occurred())
+            return NULL;
     }
     else if (arg == Py_None) {
         /* Truncate to current position if no argument is passed. */