]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-log.c
ui-ssdiff: ban strncat()
[cgit.git] / ui-log.c
index c2f92febc2ee67f91872a82c2b43018d6599a78b..8c654257b16b926aab928246a0b9e6f98cfbcd06 100644 (file)
--- 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;