[Python-checkins] cpython (merge default -> default): trunk merge

barry.warsaw python-checkins at python.org
Fri Nov 22 00:57:51 CET 2013


http://hg.python.org/cpython/rev/f0090ff52128
changeset:   87326:f0090ff52128
parent:      87325:fedc2b8fbb6e
parent:      87324:ef03369385ba
user:        Barry Warsaw <barry at python.org>
date:        Thu Nov 21 18:57:41 2013 -0500
summary:
  trunk merge

files:
  Lib/test/test_ssl.py |  1 -
  Modules/_ssl.c       |  2 +-
  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
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -1801,7 +1801,6 @@
             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
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -2520,7 +2520,7 @@
         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
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -835,7 +835,8 @@
         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)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list