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

Skip to content

Commit f3f6c45

Browse files
committed
set_options() uses unsigned long long
1 parent 0a80833 commit f3f6c45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Modules/_ssl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3623,7 +3623,7 @@ static int
36233623
set_options(PySSLContext *self, PyObject *arg, void *c)
36243624
{
36253625
PyObject *new_opts_obj;
3626-
unsigned long new_opts_arg;
3626+
unsigned long long new_opts_arg;
36273627
uint64_t new_opts, opts, clear, set;
36283628
uint64_t opt_no = (
36293629
SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 |
@@ -3633,8 +3633,8 @@ set_options(PySSLContext *self, PyObject *arg, void *c)
36333633
if (!PyArg_Parse(arg, "O!", &PyLong_Type, &new_opts_obj)) {
36343634
return -1;
36353635
}
3636-
new_opts_arg = PyLong_AsUnsignedLong(new_opts_obj);
3637-
if (new_opts_arg == (unsigned long)-1 && PyErr_Occurred()) {
3636+
new_opts_arg = PyLong_AsUnsignedLongLong(new_opts_obj);
3637+
if (new_opts_arg == (unsigned long long)-1 && PyErr_Occurred()) {
36383638
return -1;
36393639
}
36403640
Py_BUILD_ASSERT(sizeof(new_opts) >= sizeof(new_opts_arg));

0 commit comments

Comments
 (0)