From d894d6b45e19ed61105afd7cad47ddaadd0ba669 Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Tue, 4 Jul 2017 13:57:07 +0300 Subject: [PATCH] Fix --- gost12sum.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gost12sum.c b/gost12sum.c index e766bac..4936d7e 100644 --- a/gost12sum.c +++ b/gost12sum.c @@ -214,13 +214,12 @@ int hash_file(gost_hash_ctx * ctx, char *filename, char *sum, int mode) int hash_stream(gost_hash_ctx * ctx, int fd, char *sum) { unsigned char buffer[BUF_SIZE]; - unsigned char reverted_buffer[BUF_SIZE]; ssize_t bytes; size_t i; start_hash12(ctx); while ((bytes = read(fd, buffer, BUF_SIZE)) > 0) { - hash12_block(ctx, reverted_buffer, bytes); + hash12_block(ctx, buffer, bytes); } if (bytes < 0) { return 0; -- 2.39.2