Some codepaths (eg. builtin-rev-parse -> get_merge_bases -> parse_commit) can pass NULL. Signed-off-by: Martin Koegler <mkoegler@xxxxxxxxxxxxxxxxx> --- commit.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/commit.c b/commit.c index 70f1266..5d57450 100644 --- a/commit.c +++ b/commit.c @@ -311,6 +311,8 @@ int parse_commit(struct commit *item) unsigned long size; int ret; + if (!item) + return -1; if (item->object.parsed) return 0; buffer = read_sha1_file(item->object.sha1, &type, &size); -- 1.5.4.1.g96b77 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html