From 5bbcdf2c62a82eedd943c7c3bb373a836959c431 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Thu, 18 Sep 2014 18:34:15 +0200 Subject: [PATCH] lib/util_hash.c: enlarge read buffer for xbps_file_hash to increase performance. --- lib/util_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util_hash.c b/lib/util_hash.c index 6306dfb6..a374c332 100644 --- a/lib/util_hash.c +++ b/lib/util_hash.c @@ -65,7 +65,7 @@ xbps_file_hash(const char *file) char hash[SHA256_DIGEST_LENGTH * 2 + 1]; unsigned char digest[SHA256_DIGEST_LENGTH]; ssize_t ret; - unsigned char buf[256]; + unsigned char buf[4096]; int fd; if ((fd = open(file, O_RDONLY)) == -1)