Commit bbbc844c authored by Victor Stinner's avatar Victor Stinner

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.
parent a6cd2d62
......@@ -670,7 +670,7 @@ pbkdf2_hmac(PyObject *self, PyObject *args, PyObject *kwdict)
key = PyBytes_AS_STRING(key_obj);
Py_BEGIN_ALLOW_THREADS
retval = PKCS5_PBKDF2_HMAC_fast((char*)password.buf, password.len,
retval = PKCS5_PBKDF2_HMAC_fast((char*)password.buf, (int)password.len,
(unsigned char *)salt.buf, salt.len,
iterations, digest, dklen,
(unsigned char *)key);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment