From b2d908e5ee0339f21494bce5c70a75f714c49674 Mon Sep 17 00:00:00 2001 From: Adam Spragg Date: Mon, 16 May 2022 11:00:02 +0100 Subject: Reuse already calculated end-of-buffer pointer --- src/metaentry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.1