]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-repolist.c
truncate buffer before reading empty files
[ps-cgit] / ui-repolist.c
index 87196f048548e4c0627b62c67811a102dbc939b6..3aedde5456f761fe58926bfef7e28f389975aa41 100644 (file)
@@ -23,6 +23,7 @@ time_t read_agefile(char *path)
 
        if (!(f = fopen(path, "r")))
                return -1;
+       buf[0] = 0;
        if (fgets(buf, sizeof(buf), f) == NULL)
                return -1;
        fclose(f);
@@ -257,7 +258,7 @@ void cgit_print_repolist()
                        html("<td>");
                        cgit_summary_link("summary", NULL, "button", NULL);
                        cgit_log_link("log", NULL, "button", NULL, NULL, NULL,
-                                     0, NULL, NULL);
+                                     0, NULL, NULL, ctx.qry.showmsg);
                        cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL);
                        html("</td>");
                }