downcast len to int. The code has already checked that len < INT_MAX
authorChristian Heimes <christian@cheimes.de>
Thu, 21 Nov 2013 23:34:18 +0000 (00:34 +0100)
committerChristian Heimes <christian@cheimes.de>
Thu, 21 Nov 2013 23:34:18 +0000 (00:34 +0100)
Modules/_ssl.c

index d2f0d921ee58f0a28fc04133a33c12ae63a2ac60..69b1eef5f871eae60c42b789357fcd999c8c5cdc 100644 (file)
@@ -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;