Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'maint'
author
Junio C Hamano
<gitster@pobox.com>
Fri, 19 Aug 2011 05:06:03 +0000
(22:06 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 19 Aug 2011 05:06:03 +0000
(22:06 -0700)
* maint:
fetch-pack: check for valid commit from server
builtin/fetch-pack.c
patch
|
blob
|
history
raw
(from parent 1:
f85a051
)
diff --git
a/builtin/fetch-pack.c
b/builtin/fetch-pack.c
index 436798410210b868cfbe439a1603b0a340a32c50..3c871c2da893dc9deb3a36bff03a7032ea038f8a 100644
(file)
--- a/
builtin/fetch-pack.c
+++ b/
builtin/fetch-pack.c
@@
-395,6
+395,8
@@
static int find_common(int fd[2], unsigned char *result_sha1,
case ACK_continue: {
struct commit *commit =
lookup_commit(result_sha1);
+ if (!commit)
+ die("invalid commit %s", sha1_to_hex(result_sha1));
if (args.stateless_rpc
&& ack == ACK_common
&& !(commit->object.flags & COMMON)) {