diff options
author | Christian Hesse <mail@eworm.de> | 2018-08-28 18:16:11 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2018-08-28 20:24:54 +0200 |
commit | 69ba4c511d08300d2d1983fd8517ab4f0e2d7911 (patch) | |
tree | 4f40e7abdbdc3afa4a064032cb2dcd08697dca9e | |
parent | d619ba5e5564774b66c378e09448ac9983b625f7 (diff) | |
download | cgit-69ba4c511d08300d2d1983fd8517ab4f0e2d7911.tar.gz |
ui-log: ban strncpy()
Git upstream bans strncpy() with commit:
banned.h: mark strncpy() as banned
e488b7aba743d23b830d239dcc33d9ca0745a9ad
-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) while (deco) { struct object_id peeled; int is_annotated = 0; - strncpy(buf, prettify_refname(deco->name), sizeof(buf) - 1); + strlcpy(buf, prettify_refname(deco->name), sizeof(buf)); switch(deco->type) { case DECORATION_NONE: /* If the git-core doesn't recognize it, |