summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-04-18 06:20:58 +0200
committerJunio C Hamano <gitster@pobox.com>2009-04-18 06:20:58 +0200
commitf7446fc6bbe9c25f7064ba76b2db4dd67691f7d0 (patch)
tree68e605b2bd790aedf5366ee7b93697e5cdc0238d /config.c
parentgit-apply: fix option description (diff)
parentMerge branch 'maint-1.6.0' into maint-1.6.1 (diff)
downloadgit-f7446fc6bbe9c25f7064ba76b2db4dd67691f7d0.tar.xz
git-f7446fc6bbe9c25f7064ba76b2db4dd67691f7d0.zip
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)