X-Git-Url: https://git.cameronkatri.com/cgit.git/blobdiff_plain/71ba7187e5eeeaf2f66bc27bc3b48a2014d37bb7..68de710c1c0e9b823a156b1398643601a682fbf9:/ui-log.c diff --git a/ui-log.c b/ui-log.c index c2f92fe..8c65425 100644 --- a/ui-log.c +++ b/ui-log.c @@ -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, @@ -362,7 +362,7 @@ static char *next_token(char **src) } void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern, - char *path, int pager, int commit_graph, int commit_sort) + const char *path, int pager, int commit_graph, int commit_sort) { struct rev_info rev; struct commit *commit;