closes bpo-39621: Make buf arg to md5_compress be const. (GH-18497)
https://github.com/python/cpython/commit/597ebed748d0b0c061f8c108bd98270d103... commit: 597ebed748d0b0c061f8c108bd98270d103286c1 branch: master author: Andy Lester <andy@petdance.com> committer: GitHub <noreply@github.com> date: 2020-02-12T20:53:01-08:00 summary: closes bpo-39621: Make buf arg to md5_compress be const. (GH-18497) files: M Modules/md5module.c diff --git a/Modules/md5module.c b/Modules/md5module.c index d783ae5a765fa..ea2bafb9b65e8 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;
participants (1)
-
Andy Lester