-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
@@ -2,13 +2,13 @@ CGIT_VERSION = v0.8.3.3 CGIT_SCRIPT_NAME = cgit.cgi CGIT_SCRIPT_PATH = /var/www/htdocs/cgit CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH) CGIT_CONFIG = /etc/cgitrc CACHE_ROOT = /var/cache/cgit SHA1_HEADER = <openssl/sha.h> -GIT_VER = 1.7.2.2 +GIT_VER = 1.7.3 GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 INSTALL = install # Define NO_STRCASESTR if you don't have strcasestr. # # Define NO_OPENSSL to disable linking with OpenSSL and use bundled SHA1 diff --git a/git b/git -Subproject 8c67c392e1620fc3b749aa9e0b8da13bd84226f +Subproject 87b50542a08ac6caa083ddc376e674424e37940 @@ -265,25 +265,26 @@ int hextoint(char c) else return -1; } char *convert_query_hexchar(char *txt) { - int d1, d2; - if (strlen(txt) < 3) { + int d1, d2, n; + n = strlen(txt); + if (n < 3) { *txt = '\0'; return txt-1; } d1 = hextoint(*(txt+1)); d2 = hextoint(*(txt+2)); if (d1<0 || d2<0) { - strcpy(txt, txt+3); + memmove(txt, txt+3, n-3); return txt-1; } else { *txt = d1 * 16 + d2; - strcpy(txt+1, txt+3); + memmove(txt+1, txt+3, n-2); return txt; } } int http_parse_querystring(const char *txt_, void (*fn)(const char *name, const char *value)) { 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 @@ -32,6 +32,8 @@ run_test 'generate patch for initial commit' ' cgit_query "url=foo/patch&id=$root" >trash/tmp ' run_test 'find `cgit` signature' ' tail -1 trash/tmp | grep -e "^cgit" ' + +tests_done diff --git a/ui-snapshot.c b/ui-snapshot.c index 1b25dca..6e3412c 100644 --- a/ui-snapshot.c +++ b/ui-snapshot.c @@ -89,12 +89,13 @@ static int make_snapshot(const struct cgit_snapshot_format *format, } else { args.base = ""; args.baselen = 0; } args.tree = commit->tree; args.time = commit->date; + args.compression_level = Z_DEFAULT_COMPRESSION; ctx.page.mimetype = xstrdup(format->mimetype); ctx.page.filename = xstrdup(filename); cgit_print_http_headers(&ctx); format->write_func(&args); return 0; } |