commit 60619907281df67dd34e257a01b78a876f168397 from: Stefan Sperling date: Thu Dec 27 18:37:53 2018 UTC fix check for NUL byte in read_fileindex_path() commit - 2e22a7cd96554f2890a58a6abc884f057e79c2ca commit + 60619907281df67dd34e257a01b78a876f168397 blob - 0eda1d0481edfd72a67595b0c94a5025155c779a blob + 7752302bee5c346963e1f5dcaaa9b6b354b32895 --- lib/fileindex.c +++ lib/fileindex.c @@ -355,7 +355,7 @@ read_fileindex_path(char **path, SHA1_CTX *ctx, FILE * 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);