Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
reachable.c::process_tree/blob: check for NULL
author
Martin Koegler
<mkoegler@auto.tuwien.ac.at>
Mon, 18 Feb 2008 20:48:00 +0000
(21:48 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 19 Feb 2008 03:25:26 +0000
(19:25 -0800)
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>
reachable.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
cc36934
)
diff --git
a/reachable.c
b/reachable.c
index 11499a60c4202ba29b2dfc8bf1e6536343dfed4c..96a984c693b9f2c2c351142157c8a661f412aa82 100644
(file)
--- 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;