From 525b8466755b3dc71a32b09aa0af0e020e3fa61f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 25 Mar 2022 17:05:00 +0100 Subject: Fix github issue #34 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common.c') diff --git a/common.c b/common.c index dda8683..49427cf 100644 --- a/common.c +++ b/common.c @@ -317,7 +317,7 @@ check_checksums(const char *restrict filename, const struct libkeccak_spec *rest buf = emalloc(size); for (;;) { - if (ptr + blksize < size) + if (ptr + blksize > size) buf = erealloc(buf, size <<= 1); got = read(fd, buf + ptr, blksize); -- cgit v1.2.3-70-g09d2