diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-07-24 14:50:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-24 14:50:51 -0700 |
commit | b8d93072bbfd69264001b26cbe850563e0bf4021 (patch) | |
tree | c7eb4f592b2cf67310900caaa1ddf78052769e58 /builtin/blame.c | |
parent | Merge branch 'nd/command-list' (diff) | |
parent | blame: prefer xsnprintf to strcpy for colors (diff) | |
download | tgif-b8d93072bbfd69264001b26cbe850563e0bf4021.tar.xz |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index 921d127f29..468b17c30c 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); |