diff options
Diffstat (limited to 'upload-pack.c')
-rw-r--r-- | upload-pack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/upload-pack.c b/upload-pack.c index de147853b5..b26d05331d 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -534,7 +534,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, |