Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'sb/blame-color' into jk/banned-function
author
Junio C Hamano
<gitster@pobox.com>
Fri, 20 Jul 2018 21:42:53 +0000
(14:42 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 24 Jul 2018 16:05:35 +0000
(09:05 -0700)
* sb/blame-color:
blame: prefer xsnprintf to strcpy for colors
builtin/blame.c
patch
|
blob
|
history
raw
(from parent 1:
b7bd948
)
diff --git
a/builtin/blame.c
b/builtin/blame.c
index 921d127f29257facb5942e7b03304a69bafff175..468b17c30c3594f63c9c9b1eedc2f436b1f89337 100644
(file)
--- a/
builtin/blame.c
+++ b/
builtin/blame.c
@@
-1071,7
+1071,9
@@
int cmd_blame(int argc, const char **argv, const char *prefix)
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);