From: Junio C Hamano Date: Fri, 20 Jul 2018 21:42:53 +0000 (-0700) Subject: Merge branch 'sb/blame-color' into jk/banned-function X-Git-Tag: v2.19.0-rc0~68^2~4 X-Git-Url: https://git.uis.cam.ac.uk/x/uis/git/git.git/commitdiff_plain/b20a3cbb887be494a93d54858052f0a4f8df17c1?hp=b7bd9486b055c3f967a870311e704e3bb0654e4f Merge branch 'sb/blame-color' into jk/banned-function * sb/blame-color: blame: prefer xsnprintf to strcpy for colors --- 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);