summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-04-18 06:06:11 +0200
committerJunio C Hamano <gitster@pobox.com>2009-04-18 06:06:11 +0200
commit0fa0514b9172186d018c884da296ac6705c3e07c (patch)
treef9a5ceda42948715bd283727e1b93fa13548163b /config.c
parentMerge branch 'maint-1.6.0' into maint-1.6.1 (diff)
parentFix buffer overflow in config parser (diff)
downloadgit-0fa0514b9172186d018c884da296ac6705c3e07c.tar.xz
git-0fa0514b9172186d018c884da296ac6705c3e07c.zip
Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0: 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 790405a213..37e3c74861 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)