diff options
author | Barry Warsaw <barry@python.org> | 2013-11-21 18:57:41 -0500 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2013-11-21 18:57:41 -0500 |
commit | 99fc416b238a486bb9735e36cd374bf00d4af0c8 (patch) | |
tree | 133eff0fc8d930e3a7aea068480e33140d4ca37c | |
parent | 197a7702310e6a6cf67b658c66dd3b43ee12439b (diff) | |
parent | ba723200ce3effa5bea05a10fd01e3bb89ea8da7 (diff) | |
download | cpython-git-99fc416b238a486bb9735e36cd374bf00d4af0c8.tar.gz |
trunk merge
-rw-r--r-- | Lib/test/test_ssl.py | 1 | ||||
-rw-r--r-- | Modules/_ssl.c | 2 | ||||
-rw-r--r-- | Modules/pyexpat.c | 3 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 2da1386992..9996ff129d 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1801,7 +1801,6 @@ else: context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) context.verify_mode = ssl.CERT_REQUIRED context.load_verify_locations(SIGNING_CA) - context.verify_mode = ssl.CERT_REQUIRED context.verify_flags = ssl.VERIFY_DEFAULT # VERIFY_DEFAULT should pass diff --git a/Modules/_ssl.c b/Modules/_ssl.c index d2f0d921ee..69b1eef5f8 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -2520,7 +2520,7 @@ _add_ca_certs(PySSLContext *self, void *data, Py_ssize_t len, return -1; } - biobuf = BIO_new_mem_buf(data, len); + biobuf = BIO_new_mem_buf(data, (int)len); if (biobuf == NULL) { _setSSLError("Can't allocate buffer", 0, __FILE__, __LINE__); return -1; diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index e11c15355b..3f51c12ceb 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -835,7 +835,8 @@ xmlparse_Parse(xmlparseobject *self, PyObject *args) s += MAX_CHUNK_SIZE; slen -= MAX_CHUNK_SIZE; } - rc = XML_Parse(self->itself, s, slen, isFinal); + assert(MAX_CHUNK_SIZE < INT_MAX && slen < INT_MAX); + rc = XML_Parse(self->itself, s, (int)slen, isFinal); done: if (view.buf != NULL) |