diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-07-20 14:42:53 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-24 09:05:35 -0700 |
commit | b20a3cbb887be494a93d54858052f0a4f8df17c1 (patch) | |
tree | e0adeee40201d5216f3f1a126e53e13fce635b81 | |
parent | Third batch for 2.19 cycle (diff) | |
parent | blame: prefer xsnprintf to strcpy for colors (diff) | |
download | tgif-b20a3cbb887be494a93d54858052f0a4f8df17c1.tar.xz |
Merge branch 'sb/blame-color' into jk/banned-function
* sb/blame-color:
blame: prefer xsnprintf to strcpy for colors
-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); |