]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Fix
authorDmitry Belyavskiy <beldmit@gmail.com>
Tue, 4 Jul 2017 10:57:07 +0000 (13:57 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Tue, 4 Jul 2017 10:57:07 +0000 (13:57 +0300)
gost12sum.c

index e766baca283af224f42eb72219fa81f0b7e9dcf1..4936d7e4b27217edeafd4ac3e1f6cae20d86be83 100644 (file)
@@ -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;