summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorMartin Koegler <mkoegler@auto.tuwien.ac.at>2008-02-18 21:48:03 +0100
committerJunio C Hamano <gitster@pobox.com>2008-02-18 20:49:13 -0800
commitdec38c81657f02624752a65c24d72613316713f5 (patch)
tree7374e801dde04ec87a62fa4740c5a233523cac2c /upload-pack.c
parent9786f68bfcc082778aee74159540e341bb239514 (diff)
downloadgit-dec38c81657f02624752a65c24d72613316713f5.tar.gz
check return value from parse_commit() in various functions
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 51e3ec49d1..d1d2c2a1f7 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -533,7 +533,8 @@ static void receive_needs(void)
/* make sure the real parents are parsed */
unregister_shallow(object->sha1);
object->parsed = 0;
- parse_commit((struct commit *)object);
+ if (parse_commit((struct commit *)object))
+ die("invalid commit");
parents = ((struct commit *)object)->parents;
while (parents) {
add_object_array(&parents->item->object,