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 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, |