From d677db86d9fa98b063846ed461312eb04fe23ba5 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Mon, 8 Jan 2007 11:45:44 +0000 Subject: [PATCH 01/16] ssh-upload: prevent buffer overrun Prevent a client from overrunning the on stack ref buffer. Signed-off-by: Andy Whitcroft Signed-off-by: Junio C Hamano --- ssh-upload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh-upload.c b/ssh-upload.c index 0b52ae15cb..901e0366df 100644 --- a/ssh-upload.c +++ b/ssh-upload.c @@ -67,7 +67,7 @@ static int serve_ref(int fd_in, int fd_out) int posn = 0; signed char remote = 0; do { - if (read(fd_in, ref + posn, 1) < 1) + if (posn >= PATH_MAX || read(fd_in, ref + posn, 1) < 1) return -1; posn++; } while (ref[posn - 1]); From 521f9c4def9430526bfdfffdb8ed4c2f4166bece Mon Sep 17 00:00:00 2001 From: Michael Loeffler Date: Mon, 8 Jan 2007 20:23:13 +0100 Subject: [PATCH 02/16] git-commit: do not fail to print the diffstat even if there is a file named HEAD Signed-off-by: Michael Loeffler Signed-off-by: Junio C Hamano --- git-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-commit.sh b/git-commit.sh index 04aad5e5da..c2beb76fe4 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -628,7 +628,7 @@ then if test -z "$quiet" then echo "Created${initial_commit:+ initial} commit $commit" - git-diff-tree --shortstat --summary --root --no-commit-id HEAD + git-diff-tree --shortstat --summary --root --no-commit-id HEAD -- fi fi From d84029b6738197fa409861597934b29bbebad262 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 8 Jan 2007 13:59:15 -0800 Subject: [PATCH 03/16] --utf8 is now default for 'git-am' Since we are talking about allowing potentially incompatible UI changes in v1.5.0 iff the change improves the general situation, I would say why not. There is --no-utf8 flag to avoid re-coding from botching the log message just in case, but we may not even need it. Signed-off-by: Junio C Hamano --- Documentation/git-am.txt | 19 ++++++++++++++++--- git-am.sh | 8 +++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 910457d3b3..53e81cb103 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -9,7 +9,7 @@ git-am - Apply a series of patches in a mailbox SYNOPSIS -------- [verse] -'git-am' [--signoff] [--dotest=] [--utf8] [--binary] [--3way] +'git-am' [--signoff] [--dotest=] [--utf8 | --no-utf8] [--binary] [--3way] [--interactive] [--whitespace=