-rw-r--r-- | Makefile | 2 | ||||
m--------- | git | 0 | ||||
-rw-r--r-- | html.c | 9 | ||||
-rwxr-xr-x | tests/t0108-patch.sh | 2 | ||||
-rw-r--r-- | ui-snapshot.c | 1 |
5 files changed, 9 insertions, 5 deletions
@@ -4,9 +4,9 @@ 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.7.2.2 | 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. |
diff --git a/git b/git | |||
Subproject 8c67c392e1620fc3b749aa9e0b8da13bd84226f | Subproject 87b50542a08ac6caa083ddc376e674424e37940 | ||
@@ -267,21 +267,22 @@ int hextoint(char c) | |||
267 | } | 267 | } |
268 | 268 | ||
269 | char *convert_query_hexchar(char *txt) | 269 | char *convert_query_hexchar(char *txt) |
270 | { | 270 | { |
271 | int d1, d2; | 271 | int d1, d2, n; |
272 | if (strlen(txt) < 3) { | 272 | n = strlen(txt); |
273 | if (n < 3) { | ||
273 | *txt = '\0'; | 274 | *txt = '\0'; |
274 | return txt-1; | 275 | return txt-1; |
275 | } | 276 | } |
276 | d1 = hextoint(*(txt+1)); | 277 | d1 = hextoint(*(txt+1)); |
277 | d2 = hextoint(*(txt+2)); | 278 | d2 = hextoint(*(txt+2)); |
278 | if (d1<0 || d2<0) { | 279 | if (d1<0 || d2<0) { |
279 | strcpy(txt, txt+3); | 280 | memmove(txt, txt+3, n-3); |
280 | return txt-1; | 281 | return txt-1; |
281 | } else { | 282 | } else { |
282 | *txt = d1 * 16 + d2; | 283 | *txt = d1 * 16 + d2; |
283 | strcpy(txt+1, txt+3); | 284 | memmove(txt+1, txt+3, n-2); |
284 | return txt; | 285 | return txt; |
285 | } | 286 | } |
286 | } | 287 | } |
287 | 288 | ||
diff --git a/tests/t0108-patch.sh b/tests/t0108-patch.sh index 33351d6..e608104 100755 --- a/tests/t0108-patch.sh +++ b/tests/t0108-patch.sh | |||
@@ -34,4 +34,6 @@ run_test 'generate patch for initial commit' ' | |||
34 | 34 | ||
35 | run_test 'find `cgit` signature' ' | 35 | run_test 'find `cgit` signature' ' |
36 | tail -1 trash/tmp | grep -e "^cgit" | 36 | tail -1 trash/tmp | grep -e "^cgit" |
37 | ' | 37 | ' |
38 | |||
39 | tests_done | ||
diff --git a/ui-snapshot.c b/ui-snapshot.c index 1b25dca..6e3412c 100644 --- a/ui-snapshot.c +++ b/ui-snapshot.c | |||
@@ -91,8 +91,9 @@ static int make_snapshot(const struct cgit_snapshot_format *format, | |||
91 | args.baselen = 0; | 91 | args.baselen = 0; |
92 | } | 92 | } |
93 | args.tree = commit->tree; | 93 | args.tree = commit->tree; |
94 | args.time = commit->date; | 94 | args.time = commit->date; |
95 | args.compression_level = Z_DEFAULT_COMPRESSION; | ||
95 | ctx.page.mimetype = xstrdup(format->mimetype); | 96 | ctx.page.mimetype = xstrdup(format->mimetype); |
96 | ctx.page.filename = xstrdup(filename); | 97 | ctx.page.filename = xstrdup(filename); |
97 | cgit_print_http_headers(&ctx); | 98 | cgit_print_http_headers(&ctx); |
98 | format->write_func(&args); | 99 | format->write_func(&args); |