diff options
author | René Scharfe <l.s.r@web.de> | 2020-10-11 19:03:37 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-10-12 22:25:14 +0300 |
commit | db7d07f61057e94e2a3683ca10d67a2a219f542f (patch) | |
tree | ff44066f9388f3ed228af7513e61cb9017b25dc5 /builtin | |
parent | e30b1525fb017e86e08931a911f5451bf24176f5 (diff) |
blame: handle deref_tag() returning NULL
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/blame.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index bb0f29300e..b5036ab327 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -820,6 +820,8 @@ static int peel_to_commit_oid(struct object_id *oid_ret, void *cbdata) if (kind != OBJ_TAG) return -1; obj = deref_tag(r, parse_object(r, &oid), NULL, 0); + if (!obj) + return -1; oidcpy(&oid, &obj->oid); } } |