aboutsummaryrefslogtreecommitdiff
path: root/reachable.c
diff options
context:
space:
mode:
authorMartin Koegler <mkoegler@auto.tuwien.ac.at>2008-02-18 21:48:00 +0100
committerJunio C Hamano <gitster@pobox.com>2008-02-18 19:25:26 -0800
commitf7de5a56b75109e1d6651ee2b5bf7f496a5eb18b (patch)
treef9763d40e9c1ac29f7585d4b69a1d566c1743db3 /reachable.c
parentcc36934791f3857b62348b6a9e071cdf989a9177 (diff)
downloadgit-f7de5a56b75109e1d6651ee2b5bf7f496a5eb18b.tar.gz
git-f7de5a56b75109e1d6651ee2b5bf7f496a5eb18b.tar.xz
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 <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reachable.c')
-rw-r--r--reachable.c4
1 files changed, 4 insertions, 0 deletions
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;