diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-10-27 14:24:37 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-10-27 14:24:37 (GMT) |
commit | 405a7952fde22e2b03ddaaf0c1f429fcb926f127 (patch) | |
tree | 915720a474b25062fdf36a1c62f68711ee5f8aa5 /Modules/_ssl.c | |
parent | 11892ecd6dcf8714aa19b9f09c1cbcaa235e2743 (diff) | |
download | cpython-405a7952fde22e2b03ddaaf0c1f429fcb926f127.zip cpython-405a7952fde22e2b03ddaaf0c1f429fcb926f127.tar.gz cpython-405a7952fde22e2b03ddaaf0c1f429fcb926f127.tar.bz2 |
Patch #803998: Correctly check for error in SSL_write.
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r-- | Modules/_ssl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index b338aea..5fcf84c 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -373,10 +373,11 @@ static PyObject *PySSL_SSLwrite(PySSLObject *self, PyObject *args) { char *data; int len; + int count; int timedout; int err; - if (!PyArg_ParseTuple(args, "s#:write", &data, &len)) + if (!PyArg_ParseTuple(args, "s#:write", &data, &count)) return NULL; timedout = wait_for_timeout(self->Socket, 1); @@ -387,7 +388,7 @@ static PyObject *PySSL_SSLwrite(PySSLObject *self, PyObject *args) do { err = 0; Py_BEGIN_ALLOW_THREADS - len = SSL_write(self->ssl, data, len); + len = SSL_write(self->ssl, data, count); err = SSL_get_error(self->ssl, len); Py_END_ALLOW_THREADS if(PyErr_CheckSignals()) { |