author | Lars Hjemli <hjemli@gmail.com> | 2010-09-27 05:58:01 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-09-27 05:58:13 (UTC) |
commit | 82a883ede7e47616aba041a5eb36e08666ef9177 (patch) (unidiff) | |
tree | 14acc2bad5ca5375aa08cb946788b6923d72df7c | |
parent | aaa3f7854232726d5530f66b9459e036bbba15cb (diff) | |
download | cgit-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>
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | cgit.c | 2 | ||||
m--------- | git | 0 | ||||
-rw-r--r-- | ui-plain.c | 2 | ||||
-rw-r--r-- | ui-stats.c | 8 |
5 files changed, 8 insertions, 8 deletions
@@ -2,13 +2,13 @@ CGIT_VERSION = v0.8.3.3 | |||
2 | CGIT_SCRIPT_NAME = cgit.cgi | 2 | CGIT_SCRIPT_NAME = cgit.cgi |
3 | CGIT_SCRIPT_PATH = /var/www/htdocs/cgit | 3 | CGIT_SCRIPT_PATH = /var/www/htdocs/cgit |
4 | CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH) | 4 | CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH) |
5 | CGIT_CONFIG = /etc/cgitrc | 5 | CGIT_CONFIG = /etc/cgitrc |
6 | CACHE_ROOT = /var/cache/cgit | 6 | CACHE_ROOT = /var/cache/cgit |
7 | SHA1_HEADER = <openssl/sha.h> | 7 | SHA1_HEADER = <openssl/sha.h> |
8 | GIT_VER = 1.6.4.3 | 8 | GIT_VER = 1.7.3 |
9 | GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 | 9 | GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 |
10 | INSTALL = install | 10 | INSTALL = install |
11 | 11 | ||
12 | # Define NO_STRCASESTR if you don't have strcasestr. | 12 | # Define NO_STRCASESTR if you don't have strcasestr. |
13 | # | 13 | # |
14 | # Define NEEDS_LIBICONV if linking with libc is not enough (eg. Darwin). | 14 | # Define NEEDS_LIBICONV if linking with libc is not enough (eg. Darwin). |
@@ -65,13 +65,13 @@ endif | |||
65 | # Define a pattern rule for silent object building | 65 | # Define a pattern rule for silent object building |
66 | # | 66 | # |
67 | %.o: %.c | 67 | %.o: %.c |
68 | $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $< | 68 | $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $< |
69 | 69 | ||
70 | 70 | ||
71 | EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto | 71 | EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lcrypto -lpthread |
72 | OBJECTS = | 72 | OBJECTS = |
73 | OBJECTS += cache.o | 73 | OBJECTS += cache.o |
74 | OBJECTS += cgit.o | 74 | OBJECTS += cgit.o |
75 | OBJECTS += cmd.o | 75 | OBJECTS += cmd.o |
76 | OBJECTS += configfile.o | 76 | OBJECTS += configfile.o |
77 | OBJECTS += html.o | 77 | OBJECTS += html.o |
@@ -18,13 +18,13 @@ | |||
18 | const char *cgit_version = CGIT_VERSION; | 18 | const char *cgit_version = CGIT_VERSION; |
19 | 19 | ||
20 | void add_mimetype(const char *name, const char *value) | 20 | void add_mimetype(const char *name, const char *value) |
21 | { | 21 | { |
22 | struct string_list_item *item; | 22 | struct string_list_item *item; |
23 | 23 | ||
24 | item = string_list_insert(xstrdup(name), &ctx.cfg.mimetypes); | 24 | item = string_list_insert(&ctx.cfg.mimetypes, xstrdup(name)); |
25 | item->util = xstrdup(value); | 25 | item->util = xstrdup(value); |
26 | } | 26 | } |
27 | 27 | ||
28 | struct cgit_filter *new_filter(const char *cmd, int extra_args) | 28 | struct cgit_filter *new_filter(const char *cmd, int extra_args) |
29 | { | 29 | { |
30 | struct cgit_filter *f; | 30 | struct cgit_filter *f; |
diff --git a/git b/git | |||
Subproject 7fb6bcff2dece2ff9fbc5ebfe526d9b2a7e764c | Subproject 87b50542a08ac6caa083ddc376e674424e37940 | ||
@@ -32,13 +32,13 @@ static void print_object(const unsigned char *sha1, const char *path) | |||
32 | html_status(404, "Not found", 0); | 32 | html_status(404, "Not found", 0); |
33 | return; | 33 | return; |
34 | } | 34 | } |
35 | ctx.page.mimetype = NULL; | 35 | ctx.page.mimetype = NULL; |
36 | ext = strrchr(path, '.'); | 36 | ext = strrchr(path, '.'); |
37 | if (ext && *(++ext)) { | 37 | if (ext && *(++ext)) { |
38 | mime = string_list_lookup(ext, &ctx.cfg.mimetypes); | 38 | mime = string_list_lookup(&ctx.cfg.mimetypes, ext); |
39 | if (mime) | 39 | if (mime) |
40 | ctx.page.mimetype = (char *)mime->util; | 40 | ctx.page.mimetype = (char *)mime->util; |
41 | } | 41 | } |
42 | if (!ctx.page.mimetype) { | 42 | if (!ctx.page.mimetype) { |
43 | if (buffer_is_binary(buf, size)) | 43 | if (buffer_is_binary(buf, size)) |
44 | ctx.page.mimetype = "application/octet-stream"; | 44 | ctx.page.mimetype = "application/octet-stream"; |
@@ -172,24 +172,24 @@ static void add_commit(struct string_list *authors, struct commit *commit, | |||
172 | char *tmp; | 172 | char *tmp; |
173 | struct tm *date; | 173 | struct tm *date; |
174 | time_t t; | 174 | time_t t; |
175 | 175 | ||
176 | info = cgit_parse_commit(commit); | 176 | info = cgit_parse_commit(commit); |
177 | tmp = xstrdup(info->author); | 177 | tmp = xstrdup(info->author); |
178 | author = string_list_insert(tmp, authors); | 178 | author = string_list_insert(authors, tmp); |
179 | if (!author->util) | 179 | if (!author->util) |
180 | author->util = xcalloc(1, sizeof(struct authorstat)); | 180 | author->util = xcalloc(1, sizeof(struct authorstat)); |
181 | else | 181 | else |
182 | free(tmp); | 182 | free(tmp); |
183 | authorstat = author->util; | 183 | authorstat = author->util; |
184 | items = &authorstat->list; | 184 | items = &authorstat->list; |
185 | t = info->committer_date; | 185 | t = info->committer_date; |
186 | date = gmtime(&t); | 186 | date = gmtime(&t); |
187 | period->trunc(date); | 187 | period->trunc(date); |
188 | tmp = xstrdup(period->pretty(date)); | 188 | tmp = xstrdup(period->pretty(date)); |
189 | item = string_list_insert(tmp, items); | 189 | item = string_list_insert(items, tmp); |
190 | if (item->util) | 190 | if (item->util) |
191 | free(tmp); | 191 | free(tmp); |
192 | item->util++; | 192 | item->util++; |
193 | authorstat->total++; | 193 | authorstat->total++; |
194 | cgit_free_commitinfo(info); | 194 | cgit_free_commitinfo(info); |
195 | } | 195 | } |
@@ -276,13 +276,13 @@ void print_combined_authorrow(struct string_list *authors, int from, int to, | |||
276 | period->inc(tm); | 276 | period->inc(tm); |
277 | subtotal = 0; | 277 | subtotal = 0; |
278 | for (i = from; i <= to; i++) { | 278 | for (i = from; i <= to; i++) { |
279 | author = &authors->items[i]; | 279 | author = &authors->items[i]; |
280 | authorstat = author->util; | 280 | authorstat = author->util; |
281 | items = &authorstat->list; | 281 | items = &authorstat->list; |
282 | date = string_list_lookup(tmp, items); | 282 | date = string_list_lookup(items, tmp); |
283 | if (date) | 283 | if (date) |
284 | subtotal += (size_t)date->util; | 284 | subtotal += (size_t)date->util; |
285 | } | 285 | } |
286 | htmlf("<td class='%s'>%d</td>", centerclass, subtotal); | 286 | htmlf("<td class='%s'>%d</td>", centerclass, subtotal); |
287 | total += subtotal; | 287 | total += subtotal; |
288 | } | 288 | } |
@@ -328,13 +328,13 @@ void print_authors(struct string_list *authors, int top, | |||
328 | total = 0; | 328 | total = 0; |
329 | for (j = 0; j < period->count; j++) | 329 | for (j = 0; j < period->count; j++) |
330 | period->dec(tm); | 330 | period->dec(tm); |
331 | for (j = 0; j < period->count; j++) { | 331 | for (j = 0; j < period->count; j++) { |
332 | tmp = period->pretty(tm); | 332 | tmp = period->pretty(tm); |
333 | period->inc(tm); | 333 | period->inc(tm); |
334 | date = string_list_lookup(tmp, items); | 334 | date = string_list_lookup(items, tmp); |
335 | if (!date) | 335 | if (!date) |
336 | html("<td>0</td>"); | 336 | html("<td>0</td>"); |
337 | else { | 337 | else { |
338 | htmlf("<td>%d</td>", date->util); | 338 | htmlf("<td>%d</td>", date->util); |
339 | total += (size_t)date->util; | 339 | total += (size_t)date->util; |
340 | } | 340 | } |