tLower sha512 buffer size - synk - synchronize files between hosts
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 2481dadd4fb2e8b42866d81fa5ae5c600121f021
DIR parent 10e495a116df71afd7de3190ad207955889b010b
HTML Author: Willy <willyatmailoodotorg>
Date: Tue, 6 Sep 2016 08:34:18 +0200
Lower sha512 buffer size
Diffstat:
M sha512.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
DIR diff --git a/sha512.c b/sha512.c
t@@ -288,14 +288,14 @@ sha512(FILE *stream, unsigned char *hash)
{
sha512_state md;
size_t len = 0;
- unsigned char buf[128];
+ unsigned char buf[127];
if (sha512_init(&md) != 0) {
perror("sha512_init");
return 1;
}
- while ((len = fread(buf, 128, 1, stream)) > 0) {
+ while ((len = fread(buf, 127, 1, stream)) > 0) {
if (sha512_process(&md, buf, len) != 0) {
return 1;
}