Index: Modules/_bytesio.c =================================================================== --- Modules/_bytesio.c (révision 66621) +++ Modules/_bytesio.c (copie de travail) @@ -221,6 +221,8 @@ if (PyInt_Check(arg)) { size = PyInt_AsSsize_t(arg); + if (size == -1 && PyErr_Occured()) + return NULL; } else if (arg == Py_None) { /* Read until EOF is reached, by default. */ @@ -288,6 +290,8 @@ if (PyInt_Check(arg)) { size = PyInt_AsSsize_t(arg); + if (size == -1 && PyErr_Occured()) + return NULL; } else if (arg == Py_None) { /* No size limit, by default. */ @@ -332,6 +336,8 @@ if (PyInt_Check(arg)) { maxsize = PyInt_AsSsize_t(arg); + if (maxsize == -1 && PyErr_Occured()) + return NULL; } else if (arg == Py_None) { /* No size limit, by default. */ @@ -415,6 +421,8 @@ if (PyInt_Check(arg)) { size = PyInt_AsSsize_t(arg); + if (size == -1 && PyErr_Occured()) + return NULL; } else if (arg == Py_None) { /* Truncate to current position if no argument is passed. */