mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue