Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:
  Fix buffer overflow in config parser
This commit is contained in:
Junio C Hamano
2009-04-17 21:20:58 -07:00
2 changed files with 9 additions and 2 deletions

View File

@ -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)