Skip to content

Commit c1a57d3

Browse files
committed
Fix compiler warnings on Windows 64 bit: add an explicit cast from Py_ssize_t
to int, password.len was checked for being smaller than INT_MAX.
1 parent e990c6e commit c1a57d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Modules/_hashopenssl.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ pbkdf2_hmac(PyObject *self, PyObject *args, PyObject *kwdict)
670670
key = PyBytes_AS_STRING(key_obj);
671671

672672
Py_BEGIN_ALLOW_THREADS
673-
retval = PKCS5_PBKDF2_HMAC_fast((char*)password.buf, password.len,
673+
retval = PKCS5_PBKDF2_HMAC_fast((char*)password.buf, (int)password.len,
674674
(unsigned char *)salt.buf, salt.len,
675675
iterations, digest, dklen,
676676
(unsigned char *)key);

0 commit comments

Comments
 (0)