Skip to content

Commit cef5775

Browse files
committed
Merge branch 'maint'
* maint: Describe fixes since 1.6.2.3 doc/git-daemon: add missing arguments to max-connections option doc/git-daemon: add missing arguments to options init: Do not segfault on big GIT_TEMPLATE_DIR environment variable imap-send: use correct configuration variable in documentation
2 parents 1a1f063 + 67daebf commit cef5775

File tree

5 files changed

+53
-11
lines changed

5 files changed

+53
-11
lines changed

Documentation/RelNotes-1.6.2.4.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
GIT v1.6.2.4 Release Notes
2+
==========================
3+
4+
Fixes since v1.6.2.3
5+
--------------------
6+
7+
* The configuration parser had a buffer overflow while parsing an overlong
8+
value.
9+
10+
* "git-checkout <tree-ish> <submodule>" did not update the index entry at
11+
the named path; it now does.
12+
13+
* "git init" segfaulted when given an overlong template location via
14+
the --template= option.
15+
16+
* "git-ls-tree" and "git-diff-tree" used a pathspec correctly when
17+
deciding to descend into a subdirectory but they did not match the
18+
individual paths correctly. This caused pathspecs "abc/d ab" to match
19+
"abc/0" ("abc/d" made them decide to descend into the directory "abc/",
20+
and then "ab" incorrectly matched "abc/0" when it shouldn't).
21+
22+
* "git-merge-recursive" was broken when a submodule entry was involved in
23+
a criss-cross merge situation.
24+
25+
Many small documentation updates are included as well.
26+
27+
---
28+
exec >/var/tmp/1
29+
echo O=$(git describe maint)
30+
O=v1.6.2.3-21-ga51609a
31+
git shortlog --no-merges $O..maint

Documentation/git-daemon.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ OPTIONS
4848
'git-daemon' will refuse to start when this option is enabled and no
4949
whitelist is specified.
5050

51-
--base-path::
51+
--base-path=path::
5252
Remap all the path requests as relative to the given path.
5353
This is sort of "GIT root" - if you run 'git-daemon' with
5454
'--base-path=/srv/git' on example.com, then if you later try to pull
@@ -81,26 +81,26 @@ OPTIONS
8181
Incompatible with --port, --listen, --user and --group options.
8282

8383
--listen=host_or_ipaddr::
84-
Listen on an a specific IP address or hostname. IP addresses can
85-
be either an IPv4 address or an IPV6 address if supported. If IPv6
84+
Listen on a specific IP address or hostname. IP addresses can
85+
be either an IPv4 address or an IPv6 address if supported. If IPv6
8686
is not supported, then --listen=hostname is also not supported and
8787
--listen must be given an IPv4 address.
8888
Incompatible with '--inetd' option.
8989

9090
--port=n::
9191
Listen on an alternative port. Incompatible with '--inetd' option.
9292

93-
--init-timeout::
93+
--init-timeout=n::
9494
Timeout between the moment the connection is established and the
9595
client request is received (typically a rather low value, since
9696
that should be basically immediate).
9797

98-
--timeout::
98+
--timeout=n::
9999
Timeout for specific client sub-requests. This includes the time
100-
it takes for the server to process the sub-request and time spent
101-
waiting for next client's request.
100+
it takes for the server to process the sub-request and the time spent
101+
waiting for the next client's request.
102102

103-
--max-connections::
103+
--max-connections=n::
104104
Maximum number of concurrent clients, defaults to 32. Set it to
105105
zero for no limit.
106106

@@ -150,7 +150,7 @@ the facility of inet daemon to achieve the same before spawning
150150
Enable/disable the service site-wide per default. Note
151151
that a service disabled site-wide can still be enabled
152152
per repository if it is marked overridable and the
153-
repository enables the service with an configuration
153+
repository enables the service with a configuration
154154
item.
155155

156156
--allow-override=service::

Documentation/git-imap-send.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ imap.host::
5151
imap.user::
5252
The username to use when logging in to the server.
5353

54-
imap.password::
54+
imap.pass::
5555
The password to use when logging in to the server.
5656

5757
imap.port::

builtin-init-db.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ static void copy_templates(const char *template_dir)
122122
template_dir = system_path(DEFAULT_GIT_TEMPLATE_DIR);
123123
if (!template_dir[0])
124124
return;
125+
template_len = strlen(template_dir);
126+
if (PATH_MAX <= (template_len+strlen("/config")))
127+
die("insanely long template path %s", template_dir);
125128
strcpy(template_path, template_dir);
126-
template_len = strlen(template_path);
127129
if (template_path[template_len-1] != '/') {
128130
template_path[template_len++] = '/';
129131
template_path[template_len] = 0;

t/t0001-init.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,13 @@ test_expect_success 'init honors global core.sharedRepository' '
199199
x`git config -f shared-honor-global/.git/config core.sharedRepository`
200200
'
201201

202+
test_expect_success 'init rejects insanely long --template' '
203+
(
204+
insane=$(printf "x%09999dx" 1) &&
205+
mkdir test &&
206+
cd test &&
207+
test_must_fail git init --template=$insane
208+
)
209+
'
210+
202211
test_done

0 commit comments

Comments
 (0)