Skip to content

Commit 669981b

Browse files
closes bpo-39621: Make buf arg to md5_compress be const. (GH-18497)
(cherry picked from commit 597ebed) Co-authored-by: Andy Lester <[email protected]>
1 parent 2076d4f commit 669981b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/md5module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ typedef struct {
119119
a = (a + I(b,c,d) + M + t); a = ROLc(a, s) + b;
120120

121121

122-
static void md5_compress(struct md5_state *md5, unsigned char *buf)
122+
static void md5_compress(struct md5_state *md5, const unsigned char *buf)
123123
{
124124
MD5_INT32 i, W[16], a, b, c, d;
125125

@@ -242,7 +242,7 @@ md5_process(struct md5_state *md5, const unsigned char *in, Py_ssize_t inlen)
242242

243243
while (inlen > 0) {
244244
if (md5->curlen == 0 && inlen >= MD5_BLOCKSIZE) {
245-
md5_compress(md5, (unsigned char *)in);
245+
md5_compress(md5, in);
246246
md5->length += MD5_BLOCKSIZE * 8;
247247
in += MD5_BLOCKSIZE;
248248
inlen -= MD5_BLOCKSIZE;

0 commit comments

Comments
 (0)