summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Spragg <adam@spra.gg>2022-05-16 11:00:02 +0100
committerAdam Spragg <adam@spra.gg>2022-05-18 17:19:40 +0100
commitb2d908e5ee0339f21494bce5c70a75f714c49674 (patch)
tree4fbde02fe26c7d8e90295187ec9a16a2a9a3ac6d /src
parentf73bd1a104ebfe424bec72a97d51bfa64064892c (diff)
Reuse already calculated end-of-buffer pointer
Diffstat (limited to 'src')
-rw-r--r--src/metaentry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/metaentry.c b/src/metaentry.c
index 891e0c4..978ef72 100644
--- a/src/metaentry.c
+++ b/src/metaentry.c
@@ -500,7 +500,7 @@ mentries_fromfile(struct metahash **mhash, const char *path)
}
ptr += VERSIONLEN;
- while (ptr < mmapstart + sbuf.st_size) {
+ while (ptr < max) {
if (*ptr == '\0') {
msg(MSG_CRITICAL, "Invalid characters in file %s\n",
path);