summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-04-17 21:20:58 -0700
committerJunio C Hamano <gitster@pobox.com>2009-04-17 21:20:58 -0700
commitf7446fc6bbe9c25f7064ba76b2db4dd67691f7d0 (patch)
tree68e605b2bd790aedf5366ee7b93697e5cdc0238d /config.c
parentae57ec223b37556224010db93e71e3ceb2cf257b (diff)
parent0fa0514b9172186d018c884da296ac6705c3e07c (diff)
downloadgit-f7446fc6bbe9c25f7064ba76b2db4dd67691f7d0.tar.gz
Merge branch 'maint-1.6.1' into maint
* maint-1.6.1: Fix buffer overflow in config parser
Diffstat (limited to 'config.c')
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.c b/config.c
index 0c8c76f13b..7a83c76f4b 100644
--- 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)