diff options
author | Brad King <brad.king@kitware.com> | 2017-02-10 18:36:11 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-02-10 18:36:11 (GMT) |
commit | bb72fff2f09ef307b74de35ab00dfc08e6da83ee (patch) | |
tree | b919209648ec35acaf9ce10c23471bc9cbd7d549 /Utilities/cmcurl/lib/md5.c | |
parent | f236c9cff9dcb4d4534e5532a9792e648d48d921 (diff) | |
parent | d4da4755cdab41679ae7c2fa6ef2984a2d6837ec (diff) | |
download | CMake-bb72fff2f09ef307b74de35ab00dfc08e6da83ee.zip CMake-bb72fff2f09ef307b74de35ab00dfc08e6da83ee.tar.gz CMake-bb72fff2f09ef307b74de35ab00dfc08e6da83ee.tar.bz2 |
Merge topic 'update-curl'
d4da4755 Help: Add notes for topic 'update-curl'
14c77153 Tests: Fix `file://` URLs given to curl
73ae6700 curl: Fix passing _WINSOCKAPI_ macro to compiler
1df9d5f9 Merge branch 'upstream-curl' into update-curl
4cc2908f curl 2016-12-22 (44b9b4d4)
f4a3290a curl: Update script to get curl 7.52.1
Diffstat (limited to 'Utilities/cmcurl/lib/md5.c')
-rw-r--r-- | Utilities/cmcurl/lib/md5.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Utilities/cmcurl/lib/md5.c b/Utilities/cmcurl/lib/md5.c index f818d32..f2dc16c 100644 --- a/Utilities/cmcurl/lib/md5.c +++ b/Utilities/cmcurl/lib/md5.c @@ -45,7 +45,7 @@ static void MD5_Init(MD5_CTX * ctx) } static void MD5_Update(MD5_CTX * ctx, - const unsigned char * input, + const unsigned char *input, unsigned int inputLen) { md5_update(ctx, inputLen, input); @@ -71,7 +71,7 @@ static void MD5_Init(MD5_CTX * ctx) } static void MD5_Update(MD5_CTX * ctx, - const unsigned char * input, + const unsigned char *input, unsigned int inputLen) { gcry_md_write(*ctx, input, inputLen); @@ -402,7 +402,8 @@ static void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size) unsigned long used, available; saved_lo = ctx->lo; - if((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo) + ctx->lo = (saved_lo + size) & 0x1fffffff; + if(ctx->lo < saved_lo) ctx->hi++; ctx->hi += (MD5_u32plus)size >> 29; |