@@ -112,7 +112,7 @@ fcntl_fcntl_impl(PyObject *module, int fd, int code, PyObject *arg)
112112 return !async_err ? PyErr_SetFromErrno (PyExc_OSError ) : NULL ;
113113 }
114114 if (memcmp (buf + len , guard , GUARDSZ ) != 0 ) {
115- PyErr_SetString (PyExc_SystemError , "buffer overflow1 " );
115+ PyErr_SetString (PyExc_SystemError , "buffer overflow " );
116116 return NULL ;
117117 }
118118 return PyBytes_FromStringAndSize (buf , len );
@@ -236,7 +236,7 @@ fcntl_ioctl_impl(PyObject *module, int fd, unsigned long code, PyObject *arg,
236236 }
237237 PyBuffer_Release (& view );
238238 if (ptr == buf && memcmp (buf + len , guard , GUARDSZ ) != 0 ) {
239- PyErr_SetString (PyExc_SystemError , "buffer overflow2 " );
239+ PyErr_SetString (PyExc_SystemError , "buffer overflow " );
240240 return NULL ;
241241 }
242242 return PyLong_FromLong (ret );
@@ -270,7 +270,7 @@ fcntl_ioctl_impl(PyObject *module, int fd, unsigned long code, PyObject *arg,
270270 return !async_err ? PyErr_SetFromErrno (PyExc_OSError ) : NULL ;
271271 }
272272 if (memcmp (buf + len , guard , GUARDSZ ) != 0 ) {
273- PyErr_SetString (PyExc_SystemError , "buffer overflow3 " );
273+ PyErr_SetString (PyExc_SystemError , "buffer overflow " );
274274 return NULL ;
275275 }
276276 return PyBytes_FromStringAndSize (buf , len );
0 commit comments