diff options
author | Adam Spragg <adam@spra.gg> | 2022-05-16 11:00:02 +0100 |
---|---|---|
committer | Adam Spragg <adam@spra.gg> | 2022-05-18 17:19:40 +0100 |
commit | b2d908e5ee0339f21494bce5c70a75f714c49674 (patch) | |
tree | 4fbde02fe26c7d8e90295187ec9a16a2a9a3ac6d | |
parent | f73bd1a104ebfe424bec72a97d51bfa64064892c (diff) |
Reuse already calculated end-of-buffer pointer
-rw-r--r-- | src/metaentry.c | 2 |
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); |