all repos — cgit @ 7f75647b5565076b70d7c619df08e6c64dac9386

a hyperfast web frontend for git written in c

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>
Christian Hesse mail@eworm.de
Tue, 28 Aug 2018 18:16:11 +0200
commit

7f75647b5565076b70d7c619df08e6c64dac9386

parent

71ba7187e5eeeaf2f66bc27bc3b48a2014d37bb7

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M ui-log.cui-log.c

@@ -67,7 +67,7 @@ html("<span class='decoration'>");

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,