Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-07-25 00:50:50 +0300
committerJunio C Hamano <gitster@pobox.com>2018-07-25 00:50:51 +0300
commitb8d93072bbfd69264001b26cbe850563e0bf4021 (patch)
treec7eb4f592b2cf67310900caaa1ddf78052769e58 /builtin/blame.c
parentb7d510e8d55968eb448dc908f95c8e717d9e52cc (diff)
parent022d2ac1f3f89f5af1e712f72bfc69c716d64926 (diff)
Merge branch 'sb/blame-color'
Code clean-up. * sb/blame-color: blame: prefer xsnprintf to strcpy for colors
Diffstat (limited to 'builtin/blame.c')
-rw-r--r--builtin/blame.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index 921d127f292..468b17c30c3 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -1071,7 +1071,9 @@ parse_done:
find_alignment(&sb, &output_option);
if (!*repeated_meta_color &&
(output_option & OUTPUT_COLOR_LINE))
- strcpy(repeated_meta_color, GIT_COLOR_CYAN);
+ xsnprintf(repeated_meta_color,
+ sizeof(repeated_meta_color),
+ "%s", GIT_COLOR_CYAN);
}
if (output_option & OUTPUT_ANNOTATE_COMPAT)
output_option &= ~(OUTPUT_COLOR_LINE | OUTPUT_SHOW_AGE_WITH_COLOR);