summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-04-17 21:06:11 -0700
committerJunio C Hamano <gitster@pobox.com>2009-04-17 21:06:11 -0700
commit0fa0514b9172186d018c884da296ac6705c3e07c (patch)
treef9a5ceda42948715bd283727e1b93fa13548163b /config.c
parentbc69776aa12c68958e381e8c24e8faa172dde2d8 (diff)
parente0b3cc0dffbc965ffa33155cbdcf8d44716c134c (diff)
downloadgit-0fa0514b9172186d018c884da296ac6705c3e07c.tar.gz
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)