summaryrefslogtreecommitdiffabout
path: root/ui-stats.c
authorLars Hjemli <hjemli@gmail.com>2010-09-27 05:58:01 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2010-09-27 05:58:13 (UTC)
commit82a883ede7e47616aba041a5eb36e08666ef9177 (patch) (side-by-side diff)
tree14acc2bad5ca5375aa08cb946788b6923d72df7c /ui-stats.c
parentaaa3f7854232726d5530f66b9459e036bbba15cb (diff)
downloadcgit-82a883ede7e47616aba041a5eb36e08666ef9177.zip
cgit-82a883ede7e47616aba041a5eb36e08666ef9177.tar.gz
cgit-82a883ede7e47616aba041a5eb36e08666ef9177.tar.bz2
Use GIT-1.7.3
This fixes http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-2542. Noticed-by: Silvio Cesare <silvio.cesare@gmail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-stats.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-stats.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui-stats.c b/ui-stats.c
index bdaf9cc..50c2540 100644
--- a/ui-stats.c
+++ b/ui-stats.c
@@ -172,24 +172,24 @@ static void add_commit(struct string_list *authors, struct commit *commit,
char *tmp;
struct tm *date;
time_t t;
info = cgit_parse_commit(commit);
tmp = xstrdup(info->author);
- author = string_list_insert(tmp, authors);
+ author = string_list_insert(authors, tmp);
if (!author->util)
author->util = xcalloc(1, sizeof(struct authorstat));
else
free(tmp);
authorstat = author->util;
items = &authorstat->list;
t = info->committer_date;
date = gmtime(&t);
period->trunc(date);
tmp = xstrdup(period->pretty(date));
- item = string_list_insert(tmp, items);
+ item = string_list_insert(items, tmp);
if (item->util)
free(tmp);
item->util++;
authorstat->total++;
cgit_free_commitinfo(info);
}
@@ -276,13 +276,13 @@ void print_combined_authorrow(struct string_list *authors, int from, int to,
period->inc(tm);
subtotal = 0;
for (i = from; i <= to; i++) {
author = &authors->items[i];
authorstat = author->util;
items = &authorstat->list;
- date = string_list_lookup(tmp, items);
+ date = string_list_lookup(items, tmp);
if (date)
subtotal += (size_t)date->util;
}
htmlf("<td class='%s'>%d</td>", centerclass, subtotal);
total += subtotal;
}
@@ -328,13 +328,13 @@ void print_authors(struct string_list *authors, int top,
total = 0;
for (j = 0; j < period->count; j++)
period->dec(tm);
for (j = 0; j < period->count; j++) {
tmp = period->pretty(tm);
period->inc(tm);
- date = string_list_lookup(tmp, items);
+ date = string_list_lookup(items, tmp);
if (!date)
html("<td>0</td>");
else {
htmlf("<td>%d</td>", date->util);
total += (size_t)date->util;
}