From: Martin Koegler Date: Mon, 18 Feb 2008 20:48:00 +0000 (+0100) Subject: reachable.c::process_tree/blob: check for NULL X-Git-Tag: v1.5.5-rc0~93^2~14 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f7de5a56b75109e1d6651ee2b5bf7f496a5eb18b;p=git.git reachable.c::process_tree/blob: check for NULL As these functions are directly called with the result from lookup_tree/blob, they must handle NULL. Signed-off-by: Martin Koegler Signed-off-by: Junio C Hamano --- diff --git a/reachable.c b/reachable.c index 11499a60c..96a984c69 100644 --- a/reachable.c +++ b/reachable.c @@ -15,6 +15,8 @@ static void process_blob(struct blob *blob, { struct object *obj = &blob->object; + if (!blob) + die("bad blob object"); if (obj->flags & SEEN) return; obj->flags |= SEEN; @@ -39,6 +41,8 @@ static void process_tree(struct tree *tree, struct name_entry entry; struct name_path me; + if (!tree) + die("bad tree object"); if (obj->flags & SEEN) return; obj->flags |= SEEN;