From dec38c81657f02624752a65c24d72613316713f5 Mon Sep 17 00:00:00 2001 From: Martin Koegler Date: Mon, 18 Feb 2008 21:48:03 +0100 Subject: check return value from parse_commit() in various functions Signed-off-by: Martin Koegler Signed-off-by: Junio C Hamano --- shallow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shallow.c') diff --git a/shallow.c b/shallow.c index dbd9f5ad0a..ab975482d0 100644 --- a/shallow.c +++ b/shallow.c @@ -70,7 +70,8 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth, cur_depth = *(int *)commit->util; } } - parse_commit(commit); + if (parse_commit(commit)) + die("invalid commit"); commit->object.flags |= not_shallow_flag; cur_depth++; for (p = commit->parents, commit = NULL; p; p = p->next) { -- cgit v1.2.3