aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fchash.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-06-28 16:47:15 +0200
committermarha <marha@users.sourceforge.net>2013-06-28 16:47:15 +0200
commitced1a6b8f5a750fcd3b8d3d0d9bbdee830064e6c (patch)
tree24d79f7eaee4d69dde46cf88aa7314a4fceebbe5 /fontconfig/src/fchash.c
parent2fe2056807d1304de86deb2b59992d51d9252ad0 (diff)
downloadvcxsrv-ced1a6b8f5a750fcd3b8d3d0d9bbdee830064e6c.tar.gz
vcxsrv-ced1a6b8f5a750fcd3b8d3d0d9bbdee830064e6c.tar.bz2
vcxsrv-ced1a6b8f5a750fcd3b8d3d0d9bbdee830064e6c.zip
fontconfig mesa git update 28 June 2013
fontconfig commit 197d06c49b01413303f2c92130594daa4fcaa6ad mesa commit 24b05ff1581b612ab6dbf4937fa4b644b4e61379
Diffstat (limited to 'fontconfig/src/fchash.c')
-rw-r--r--fontconfig/src/fchash.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fontconfig/src/fchash.c b/fontconfig/src/fchash.c
index 92585a632..7216beead 100644
--- a/fontconfig/src/fchash.c
+++ b/fontconfig/src/fchash.c
@@ -190,14 +190,14 @@ FcHashGetSHA256Digest (const FcChar8 *input_strings,
}
/* set input size at the end */
len *= 8;
- block[63 - 0] = len & 0xff;
- block[63 - 1] = (len >> 8) & 0xff;
- block[63 - 2] = (len >> 16) & 0xff;
- block[63 - 3] = (len >> 24) & 0xff;
- block[63 - 4] = (len >> 32) & 0xff;
- block[63 - 5] = (len >> 40) & 0xff;
- block[63 - 6] = (len >> 48) & 0xff;
- block[63 - 7] = (len >> 56) & 0xff;
+ block[63 - 0] = (uint64_t)len & 0xff;
+ block[63 - 1] = ((uint64_t)len >> 8) & 0xff;
+ block[63 - 2] = ((uint64_t)len >> 16) & 0xff;
+ block[63 - 3] = ((uint64_t)len >> 24) & 0xff;
+ block[63 - 4] = ((uint64_t)len >> 32) & 0xff;
+ block[63 - 5] = ((uint64_t)len >> 40) & 0xff;
+ block[63 - 6] = ((uint64_t)len >> 48) & 0xff;
+ block[63 - 7] = ((uint64_t)len >> 56) & 0xff;
FcHashComputeSHA256Digest (ret, block);
return FcHashSHA256ToString (ret);
@@ -226,7 +226,7 @@ FcHashGetSHA256DigestFromFile (const FcChar8 *filename)
{
if ((len = fread (ibuf, sizeof (char), 64, fp)) < 64)
{
- long v;
+ uint64_t v;
/* add a padding */
memset (&ibuf[len], 0, 64 - len);
@@ -281,7 +281,7 @@ FcHashGetSHA256DigestFromMemory (const char *fontdata,
{
if ((length - i) < 64)
{
- long v;
+ uint64_t v;
size_t n;
/* add a padding */