aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lpm.c')
-rw-r--r--src/lpm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lpm.c b/src/lpm.c
index 163c7b0..17da4cc 100644
--- a/src/lpm.c
+++ b/src/lpm.c
@@ -115,7 +115,7 @@ static int lpm_hash(lua_State* L) {
unsigned char chunk[4096];
size_t bytes = fread(chunk, 1, sizeof(chunk), file);
mbedtls_sha256_update_ret(&hash_ctx, chunk, bytes);
- if (bytes < 4096)
+ if (bytes < sizeof(chunk))
break;
}
fclose(file);