diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2005-11-21 11:18:20 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-21 14:04:22 -0800 |
commit | 3dd94e3b2e2f5b00512273f96ab5628c742c112c (patch) | |
tree | 9f25338f0dc57dbb427e7229b539dc6a5c34884c /config-set.c | |
parent | git-proxy updates. (diff) | |
download | tgif-3dd94e3b2e2f5b00512273f96ab5628c742c112c.tar.xz |
git-config-set: Properly terminate strings with '\0'
When a lowercase version of the key was generated, it was not
terminated. Strangely enough, it worked on Linux and macosx anyway.
Just cygwin barfed.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'config-set.c')
-rw-r--r-- | config-set.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/config-set.c b/config-set.c index 5f654f7aff..d938f96768 100644 --- a/config-set.c +++ b/config-set.c @@ -38,6 +38,7 @@ static int get_value(const char* key_, const char* regex_) key = malloc(strlen(key_)+1); for (i = 0; key_[i]; i++) key[i] = tolower(key_[i]); + key[i] = 0; if (regex_) { if (regex_[0] == '!') { |