Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> --- setup.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/setup.c b/setup.c index 2c51a9a..c1995b7 100644 --- a/setup.c +++ b/setup.c @@ -436,6 +436,8 @@ const char *read_gitfile_gently(const char *path) if (len < 9) die("No path in gitfile: %s", path); buf[len] = '\0'; + if (strlen(buf) < len) + die("invalid gitfile format: %s", path); dir = buf + 8; if (!is_absolute_path(dir) && (slash = strrchr(path, '/'))) { -- 1.7.4.74.g639db -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html