Author: Christian Hesse <mail@eworm.de>
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>
ui-log.c | 2 +-
diff --git a/ui-log.c b/ui-log.c
index c2f92febc2ee67f91872a82c2b43018d6599a78b..3bcb657657e47265ffe499910a7508ad9323287f 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -67,7 +67,7 @@ html("");
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,