From: Joel Rosdahl Date: Thu, 18 Jun 2020 18:18:37 +0000 (+0200) Subject: Fix bug in hash_binary_file X-Git-Tag: v4.0~390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e412b14afee24cf92a8f8aaf4fd2d0ac6fb9830e;p=thirdparty%2Fccache.git Fix bug in hash_binary_file Introduced in #577 (213d9883). --- diff --git a/src/hashutil.cpp b/src/hashutil.cpp index 97f12f939..777c1e8ef 100644 --- a/src/hashutil.cpp +++ b/src/hashutil.cpp @@ -361,7 +361,7 @@ hash_binary_file(const Context& ctx, struct hash* hash, const char* path) Digest digest; if (!ctx.inode_cache.get(path, InodeCache::ContentType::binary, digest)) { struct hash* file_hash = hash_init(); - if (!hash_file(hash, path)) { + if (!hash_file(file_hash, path)) { return false; } digest = hash_result(file_hash);