Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1dbf61f

Browse files
committed
downcast len to int. The code has already checked that len < INT_MAX
1 parent 18fc7be commit 1dbf61f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2520,7 +2520,7 @@ _add_ca_certs(PySSLContext *self, void *data, Py_ssize_t len,
25202520
return -1;
25212521
}
25222522

2523-
biobuf = BIO_new_mem_buf(data, len);
2523+
biobuf = BIO_new_mem_buf(data, (int)len);
25242524
if (biobuf == NULL) {
25252525
_setSSLError("Can't allocate buffer", 0, __FILE__, __LINE__);
25262526
return -1;

0 commit comments

Comments
 (0)