Skip to content

Commit 806f31e

Browse files
committed
Add build assertion
1 parent 669672e commit 806f31e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Modules/_ssl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3614,7 +3614,9 @@ PyDoc_STRVAR(PySSLContext_security_level_doc, "The current security level");
36143614
static PyObject *
36153615
get_options(PySSLContext *self, void *c)
36163616
{
3617-
return PyLong_FromUnsignedLongLong(SSL_CTX_get_options(self->ctx));
3617+
uint64_t options = SSL_CTX_get_options(self->ctx);
3618+
Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(options));
3619+
return PyLong_FromUnsignedLongLong(options);
36183620
}
36193621

36203622
static int

0 commit comments

Comments
 (0)