From 82a883ede7e47616aba041a5eb36e08666ef9177 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Mon, 27 Sep 2010 07:58:01 +0200 Subject: Use GIT-1.7.3 This fixes http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-2542. Noticed-by: Silvio Cesare Signed-off-by: Lars Hjemli diff --git a/Makefile b/Makefile index 5162020..0349639 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH) CGIT_CONFIG = /etc/cgitrc CACHE_ROOT = /var/cache/cgit SHA1_HEADER = -GIT_VER = 1.6.4.3 +GIT_VER = 1.7.3 GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 INSTALL = install @@ -68,7 +68,7 @@ endif $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $< -EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto +EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto -lpthread OBJECTS = OBJECTS += cache.o OBJECTS += cgit.o diff --git a/cgit.c b/cgit.c index 6c7e811..ad62d10 100644 --- a/cgit.c +++ b/cgit.c @@ -21,7 +21,7 @@ void add_mimetype(const char *name, const char *value) { struct string_list_item *item; - item = string_list_insert(xstrdup(name), &ctx.cfg.mimetypes); + item = string_list_insert(&ctx.cfg.mimetypes, xstrdup(name)); item->util = xstrdup(value); } diff --git a/git b/git index 7fb6bcf..87b5054 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit 7fb6bcff2dece2ff9fbc5ebfe526d9b2a7e764c4 +Subproject commit 87b50542a08ac6caa083ddc376e674424e37940a diff --git a/ui-plain.c b/ui-plain.c index 66cb19c..5569a7c 100644 --- a/ui-plain.c +++ b/ui-plain.c @@ -35,7 +35,7 @@ static void print_object(const unsigned char *sha1, const char *path) ctx.page.mimetype = NULL; ext = strrchr(path, '.'); if (ext && *(++ext)) { - mime = string_list_lookup(ext, &ctx.cfg.mimetypes); + mime = string_list_lookup(&ctx.cfg.mimetypes, ext); if (mime) ctx.page.mimetype = (char *)mime->util; } diff --git a/ui-stats.c b/ui-stats.c index bdaf9cc..50c2540 100644 --- a/ui-stats.c +++ b/ui-stats.c @@ -175,7 +175,7 @@ static void add_commit(struct string_list *authors, struct commit *commit, 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 @@ -186,7 +186,7 @@ static void add_commit(struct string_list *authors, struct commit *commit, 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++; @@ -279,7 +279,7 @@ void print_combined_authorrow(struct string_list *authors, int from, int to, 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; } @@ -331,7 +331,7 @@ void print_authors(struct string_list *authors, int top, 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("0"); else { -- cgit v0.10.1 From af492114ccf6d5ab72890277ad828cf6d9fa8909 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Mon, 27 Sep 2010 08:00:47 +0200 Subject: CGIT 0.8.3.4 Signed-off-by: Lars Hjemli diff --git a/Makefile b/Makefile index 0349639..2dae3ac 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CGIT_VERSION = v0.8.3.3 +CGIT_VERSION = v0.8.3.4 CGIT_SCRIPT_NAME = cgit.cgi CGIT_SCRIPT_PATH = /var/www/htdocs/cgit CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH) -- cgit v0.10.1