diff options
author | Christian Hesse | 2018-08-28 18:16:11 +0200 |
---|---|---|
committer | Christian Hesse | 2018-09-11 08:47:12 +0200 |
commit | 7f75647b5565076b70d7c619df08e6c64dac9386 (patch) | |
tree | b37af8d53f998bb5bf99874f0cd90c3f6715b53a | |
parent | 71ba7187e5eeeaf2f66bc27bc3b48a2014d37bb7 (diff) | |
download | cgit-7f75647b5565076b70d7c619df08e6c64dac9386.tar.gz cgit-7f75647b5565076b70d7c619df08e6c64dac9386.tar.bz2 cgit-7f75647b5565076b70d7c619df08e6c64dac9386.zip |
ui-log: ban strncpy()
Git upstream bans strncpy() with commit:
banned.h: mark strncpy() as banned
e488b7aba743d23b830d239dcc33d9ca0745a9ad
Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r-- | ui-log.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -67,7 +67,7 @@ void show_commit_decorations(struct commit *commit) | |||
67 | while (deco) { | 67 | while (deco) { |
68 | struct object_id peeled; | 68 | struct object_id peeled; |
69 | int is_annotated = 0; | 69 | int is_annotated = 0; |
70 | strncpy(buf, prettify_refname(deco->name), sizeof(buf) - 1); | 70 | strlcpy(buf, prettify_refname(deco->name), sizeof(buf)); |
71 | switch(deco->type) { | 71 | switch(deco->type) { |
72 | case DECORATION_NONE: | 72 | case DECORATION_NONE: |
73 | /* If the git-core doesn't recognize it, | 73 | /* If the git-core doesn't recognize it, |