tFix crash - dedup - deduplicating backup program
 (HTM) git clone git://git.z3bra.org/dedup.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 6d6cce9ed24f393e09afec8f45d3c2566210038d
 (DIR) parent 3ce9db0f144f9d5a39a9180ed343d9498d064778
 (HTM) Author: sin <sin@2f30.org>
       Date:   Sun, 17 Feb 2019 21:51:47 +0000
       
       Fix crash
       
       Diffstat:
         M dedup.c                             |       6 +++---
       
       1 file changed, 3 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/dedup.c b/dedup.c
       t@@ -502,7 +502,7 @@ check(struct ent *ent, void *arg)
                SHA256_CTX ctx;
                uint64_t i;
        
       -        buf = alloc_buf(BLKSIZE);
       +        buf = alloc_buf(comp_size(BLKSIZE));
                /*
                 * Calculate hash for each block and compare
                 * with index entry block descriptor
       t@@ -553,7 +553,7 @@ rebuild_cache(struct ent *ent, void *arg)
                SHA256_CTX ctx;
                uint64_t i;
        
       -        buf = alloc_buf(BLKSIZE);
       +        buf = alloc_buf(comp_size(BLKSIZE));
                for (i = 0; i < ent->nblks; i++) {
                        struct cent *cent;
        
       t@@ -602,7 +602,7 @@ init_cache(void)
                uint64_t nents, i;
                uint64_t min, max, avg;
        
       -        min = BLKSIZE;
       +        min = comp_size(BLKSIZE);
                max = 0;
                avg = 0;