mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Issue #9566: cast unsigned int to Py_ssize_t in md5 and sha1 modules
Fix a compiler warning on Windows 64 bits.
This commit is contained in:
parent
0bec35d2d0
commit
081fe46ff9
2 changed files with 2 additions and 2 deletions
|
@ -218,7 +218,7 @@ void sha1_process(struct sha1_state *sha1,
|
|||
in += SHA1_BLOCKSIZE;
|
||||
inlen -= SHA1_BLOCKSIZE;
|
||||
} else {
|
||||
n = MIN(inlen, (SHA1_BLOCKSIZE - sha1->curlen));
|
||||
n = MIN(inlen, (Py_ssize_t)(SHA1_BLOCKSIZE - sha1->curlen));
|
||||
memcpy(sha1->buf + sha1->curlen, in, (size_t)n);
|
||||
sha1->curlen += n;
|
||||
in += n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue