fix check for NUL byte in read_fileindex_path()
diff --git a/lib/fileindex.c b/lib/fileindex.c
index 0eda1d0..7752302 100644
--- a/lib/fileindex.c
+++ b/lib/fileindex.c
@@ -355,7 +355,7 @@ read_fileindex_path(char **path, SHA1_CTX *ctx, FILE *infile)
SHA1Update(ctx, buf, sizeof(buf));
memcpy(*path + len, buf, sizeof(buf));
len += sizeof(buf);
- } while (strchr(buf, '\0') == NULL);
+ } while (memchr(buf, '\0', sizeof(buf)) == NULL);
if (err) {
free(*path);