Kaydet (Commit) c1a57d30 authored tarafından 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.
üst e990c6e9
...@@ -670,7 +670,7 @@ pbkdf2_hmac(PyObject *self, PyObject *args, PyObject *kwdict) ...@@ -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);
......
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