diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-02-13 05:12:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-13 05:12:53 (GMT) |
commit | 669981b3b14dd16dec42089d6ac8d6449fde8abd (patch) | |
tree | ae7bb92dc4c4ec5957b91d25cfcdc8fdb871d810 /Modules/md5module.c | |
parent | 2076d4f97ef514bb4dc4ca768fbaa3f538ce7f1f (diff) | |
download | cpython-669981b3b14dd16dec42089d6ac8d6449fde8abd.zip cpython-669981b3b14dd16dec42089d6ac8d6449fde8abd.tar.gz cpython-669981b3b14dd16dec42089d6ac8d6449fde8abd.tar.bz2 |
closes bpo-39621: Make buf arg to md5_compress be const. (GH-18497)
(cherry picked from commit 597ebed748d0b0c061f8c108bd98270d103286c1)
Co-authored-by: Andy Lester <andy@petdance.com>
Diffstat (limited to 'Modules/md5module.c')
-rw-r--r-- | Modules/md5module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/md5module.c b/Modules/md5module.c index b9a351a..c2ebaaf 100644 --- a/Modules/md5module.c +++ b/Modules/md5module.c @@ -119,7 +119,7 @@ typedef struct { a = (a + I(b,c,d) + M + t); a = ROLc(a, s) + b; -static void md5_compress(struct md5_state *md5, unsigned char *buf) +static void md5_compress(struct md5_state *md5, const unsigned char *buf) { MD5_INT32 i, W[16], a, b, c, d; @@ -242,7 +242,7 @@ md5_process(struct md5_state *md5, const unsigned char *in, Py_ssize_t inlen) while (inlen > 0) { if (md5->curlen == 0 && inlen >= MD5_BLOCKSIZE) { - md5_compress(md5, (unsigned char *)in); + md5_compress(md5, in); md5->length += MD5_BLOCKSIZE * 8; in += MD5_BLOCKSIZE; inlen -= MD5_BLOCKSIZE; |