summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorPeter Eriksen <s022018@student.dtu.dk>2006-06-11 14:03:28 +0200
committerJunio C Hamano <junkio@cox.net>2006-06-16 22:45:12 -0700
commitbfbd0bb6ecbbbf75a5caaff6afaf5a6af8fa518e (patch)
tree52f36804599a41eafa3a020f06dbe118c6f652f9 /config.c
parent5996ca0836e21ab4e6be0a16a615eff965f18b8b (diff)
downloadgit-bfbd0bb6ecbbbf75a5caaff6afaf5a6af8fa518e.tar.gz
Implement safe_strncpy() as strlcpy() and use it more.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'config.c')
-rw-r--r--config.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/config.c b/config.c
index c47497001e..984c75f5dd 100644
--- a/config.c
+++ b/config.c
@@ -280,17 +280,17 @@ int git_default_config(const char *var, const char *value)
}
if (!strcmp(var, "user.name")) {
- strncpy(git_default_name, value, sizeof(git_default_name));
+ safe_strncpy(git_default_name, value, sizeof(git_default_name));
return 0;
}
if (!strcmp(var, "user.email")) {
- strncpy(git_default_email, value, sizeof(git_default_email));
+ safe_strncpy(git_default_email, value, sizeof(git_default_email));
return 0;
}
if (!strcmp(var, "i18n.commitencoding")) {
- strncpy(git_commit_encoding, value, sizeof(git_commit_encoding));
+ safe_strncpy(git_commit_encoding, value, sizeof(git_commit_encoding));
return 0;
}