aboutsummaryrefslogtreecommitdiffstats
path: root/common.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-03-25 17:05:00 +0100
committerMattias Andrée <maandree@kth.se>2022-03-25 17:05:00 +0100
commit525b8466755b3dc71a32b09aa0af0e020e3fa61f (patch)
tree48439176478e3d1a92b87f7d20bda1fa6e2311dd /common.c
parentUpdate clean rule in Makefile (diff)
downloadsha3sum-525b8466755b3dc71a32b09aa0af0e020e3fa61f.tar.gz
sha3sum-525b8466755b3dc71a32b09aa0af0e020e3fa61f.tar.bz2
sha3sum-525b8466755b3dc71a32b09aa0af0e020e3fa61f.tar.xz
Fix github issue #341.2.2
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--common.c2
1 files changed, 1 insertions, 1 deletions
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);