Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
list-objects.c::process_tree/blob: check for NULL
author
Martin Koegler
<mkoegler@auto.tuwien.ac.at>
Mon, 18 Feb 2008 20:47:56 +0000
(21:47 +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>
list-objects.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
c340663
)
diff --git
a/list-objects.c
b/list-objects.c
index 4ef58e7ec01ebdfc6f036ccafaf837b2b38ed7a5..c8b8375e4983794e601ba69a1c217a3c711835e9 100644
(file)
--- a/
list-objects.c
+++ b/
list-objects.c
@@
-18,6
+18,8
@@
static void process_blob(struct rev_info *revs,
if (!revs->blob_objects)
return;
+ if (!obj)
+ die("bad blob object");
if (obj->flags & (UNINTERESTING | SEEN))
return;
obj->flags |= SEEN;
@@
-69,6
+71,8
@@
static void process_tree(struct rev_info *revs,
if (!revs->tree_objects)
return;
+ if (!obj)
+ die("bad tree object");
if (obj->flags & (UNINTERESTING | SEEN))
return;
if (parse_tree(tree) < 0)