Line 0
Link Here
|
|
|
1 |
--- thirdparty/lcms2/src/cmsmd5.c.orig 2018-10-31 19:49:39 UTC |
2 |
+++ thirdparty/lcms2/src/cmsmd5.c |
3 |
@@ -29,7 +29,7 @@ |
4 |
#ifdef CMS_USE_BIG_ENDIAN |
5 |
|
6 |
static |
7 |
-void byteReverse(cmsUInt8Number * buf, cmsUInt32Number longs) |
8 |
+void byteReverse(cmsContext ContextID, cmsUInt8Number * buf, cmsUInt32Number longs) |
9 |
{ |
10 |
do { |
11 |
|
12 |
@@ -42,7 +42,7 @@ void byteReverse(cmsUInt8Number * buf, cmsUInt32Number |
13 |
} |
14 |
|
15 |
#else |
16 |
-#define byteReverse(buf, len) |
17 |
+#define byteReverse(ContextID, buf, len) |
18 |
#endif |
19 |
|
20 |
|
21 |
@@ -196,7 +196,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cms |
22 |
} |
23 |
|
24 |
memmove(p, buf, t); |
25 |
- byteReverse(ctx->in, 16); |
26 |
+ byteReverse(ctx->ContextID, ctx->in, 16); |
27 |
|
28 |
MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in); |
29 |
buf += t; |
30 |
@@ -205,7 +205,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cms |
31 |
|
32 |
while (len >= 64) { |
33 |
memmove(ctx->in, buf, 64); |
34 |
- byteReverse(ctx->in, 16); |
35 |
+ byteReverse(ctx->ContextID, ctx->in, 16); |
36 |
MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in); |
37 |
buf += 64; |
38 |
len -= 64; |
39 |
@@ -232,21 +232,21 @@ void MD5finish(cmsProfileID* ProfileID, cmsHANDLE Han |
40 |
if (count < 8) { |
41 |
|
42 |
memset(p, 0, count); |
43 |
- byteReverse(ctx->in, 16); |
44 |
+ byteReverse(ctx->ContextID, ctx->in, 16); |
45 |
MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in); |
46 |
|
47 |
memset(ctx->in, 0, 56); |
48 |
} else { |
49 |
memset(p, 0, count - 8); |
50 |
} |
51 |
- byteReverse(ctx->in, 14); |
52 |
+ byteReverse(ctx->ContextID, ctx->in, 14); |
53 |
|
54 |
((cmsUInt32Number *) ctx->in)[14] = ctx->bits[0]; |
55 |
((cmsUInt32Number *) ctx->in)[15] = ctx->bits[1]; |
56 |
|
57 |
MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in); |
58 |
|
59 |
- byteReverse((cmsUInt8Number *) ctx->buf, 4); |
60 |
+ byteReverse(ctx->ContextID, (cmsUInt8Number *) ctx->buf, 4); |
61 |
memmove(ProfileID ->ID8, ctx->buf, 16); |
62 |
|
63 |
_cmsFree(ctx ->ContextID, ctx); |