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.
This commit is contained in:
parent
e990c6e952
commit
c1a57d306c
|
@ -670,7 +670,7 @@ pbkdf2_hmac(PyObject *self, PyObject *args, PyObject *kwdict)
|
||||||
key = PyBytes_AS_STRING(key_obj);
|
key = PyBytes_AS_STRING(key_obj);
|
||||||
|
|
||||||
Py_BEGIN_ALLOW_THREADS
|
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,
|
(unsigned char *)salt.buf, salt.len,
|
||||||
iterations, digest, dklen,
|
iterations, digest, dklen,
|
||||||
(unsigned char *)key);
|
(unsigned char *)key);
|
||||||
|
|
Loading…
Reference in New Issue