Avoid unnecessary 'lstat()' calls in 'get_stat_data()'
[gitweb.git] / config.c
index 790405a213b12a4d1c62d9354e1292e0dc6af057..37e3c74861cb335d4bacab86c2f5d03cd95f43bf 100644 (file)
--- a/config.c
+++ b/config.c
@@ -51,7 +51,7 @@ static char *parse_value(void)
 
        for (;;) {
                int c = get_next_char();
-               if (len >= sizeof(value))
+               if (len >= sizeof(value) - 1)
                        return NULL;
                if (c == '\n') {
                        if (quote)