Skip to content
Snippets Groups Projects
Commit 2132c3f3 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix MD5 calculation for cache files over 32k

parent 8951f194
No related branches found
No related tags found
No related merge requests found
Pipeline #7443 passed
...@@ -3397,8 +3397,9 @@ apc_handler(char *strbuf, size_t slen, void *apcd) ...@@ -3397,8 +3397,9 @@ apc_handler(char *strbuf, size_t slen, void *apcd)
while (!feof(f)) { while (!feof(f)) {
rc = fread(buf, 1, 1024 * 32, f); rc = fread(buf, 1, 1024 * 32, f);
if (rc > 0) if (rc > 0)
MD5_calc(digest, buf, rc); MD5_digest(&ctx, buf, rc);
} }
MD5_close(&ctx, digest);
fclose(f); fclose(f);
MD5_hex(buf, digest); MD5_hex(buf, digest);
conn_send(buf, strlen(buf), 0); conn_send(buf, strlen(buf), 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment